[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h264.c bug fixed: decoder fails after restart on non-annex-b content.
h.leppkes at gmail.com
Sat Jul 25 14:13:38 CEST 2015
On Fri, Jul 24, 2015 at 1:34 PM, Ivan Uskov <ivan.uskov at nablet.com> wrote:
> Hello All,
> The current implementation of libavcodec/qsvdec_h264.c does not store
> original extradata buffer. At the same time the
> \libavcodec\h264_mp4toannexb_bsf filter does modify extradata buffer
> inplace and fails to process it next time if decoder reinitializes.
> So it is not possible to decode mp4 or mkv container using ffmpeg
> command line with h264_qsv decoder.
> The attached patch solves this issue. The corresponded code was taken
> from \libavcodec\crystalhd.c which also uses the h264_mp4toannexb_bsf
I'm slightly confused by the entire concept here.
- Why does the decoder need to re-init anyway?
- You want the bsf to convert the bitstream to annexb, but not the
extradata? Why not?
- Ideally, a decoder should support both bitstream syntax without the
bsf, since the bsf is a hack for re-muxing, and many playback
applications do not use the bsf since practically no decoder otherwise
More information about the ffmpeg-devel