av_find_stream_info() end check fixes