[FFmpeg-devel] [PATCH 2/2] avcodec/videotoolbox: fix decoding of some h264 bitstreams

wm4 nfxjfg at googlemail.com
Fri Oct 2 19:17:25 CEST 2015


On Thu,  1 Oct 2015 18:13:21 +0200
wm4 <nfxjfg at googlemail.com> wrote:

> This affects Annex B streams (such as demuxed from .ts and others). It
> also handles the format change in reinit-large_420_8-to-small_420_8.h264
> correctly.
> 
> Instead of passing through the extradata, create it on the fly it from
> the currently active SPS and PPS. Since reconstructing the PPS and SPS
> NALs would be very complicated and verbose, we use the NALs as they
> originally appeared in the bitstream.
> 
> The code for writing the extradata is somewhat derived from
> libavformat/avc.c, but it's small and different enough that sharing it
> is not really worth it.
> ---
> Even though it requires changes in the general h264 decoder (previous
> patch), this solution is much cleaner and more robust than my patch
> from yesterday.
> ---
>  libavcodec/videotoolbox.c | 48 +++++++++++++++++++++++++++++------------------
>  1 file changed, 30 insertions(+), 18 deletions(-)
> 

Both patches applied, with some requested amends (here, IRC) applied.


More information about the ffmpeg-devel mailing list