]> git.sesse.net Git - ffmpeg/commit
avcodec/videotoolbox: fix decoding of some h264 bitstreams
authorwm4 <nfxjfg@googlemail.com>
Fri, 2 Oct 2015 15:18:06 +0000 (17:18 +0200)
committerwm4 <nfxjfg@googlemail.com>
Fri, 2 Oct 2015 17:09:16 +0000 (19:09 +0200)
commit16aac9a359199f1be9963b476e5f75908a6018aa
treed6ec5f1fbb978b5d7ca291b115da13ace2243539
parent069190f7078e1e3abbfa27e2d97a10f33ae05fef
avcodec/videotoolbox: fix decoding of some h264 bitstreams

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.
libavcodec/videotoolbox.c