[FFmpeg-devel] [PATCH] lavc/videotoolbox: fix avcc creation for h264 streams missing extradata
nfxjfg at googlemail.com
Mon Oct 24 22:25:21 EEST 2016
On Mon, 24 Oct 2016 12:18:07 -0700
Aman Gupta <ffmpeg at tmm1.net> wrote:
> On Sun, Oct 23, 2016 at 11:20 PM, Aman Gupta <aman at tmm1.net> wrote:
> > On Sunday, October 23, 2016, Richard Kern <kernrj at gmail.com> wrote:
> >> > On Oct 19, 2016, at 8:45 PM, Aman Gupta <ffmpeg at tmm1.net> wrote:
> >> >
> >> > From: Aman Gupta <aman at tmm1.net>
> >> >
> >> > ff_videotoolbox_avcc_extradata_create() was never being called if
> >> > avctx->extradata_size==0, even though the function does not need or use
> >> > the avctx->extradata.
> >> Could this be a bug in another part of the code? It seems like extradata
> >> should be set.
> > Yes it definitely could be. I can verify if extradata is present on macOS
> > where the same sample and ffmpeg version worked.
> Looks like missing extradata has nothing to do with the platform, but
> rather only happens when you skip calling avformat_find_stream_info().
> I am skipping the find_stream_info() call to reduce time spent probing and
> begin playback more quickly, since the initial avformat_open_input() is
> enough to discover available streams on mpegts containers.
> That means this issue is not as widespread as I initially thought, but I
> still think it's an optimization worth making.
That makes sense. I think a decoder shouldn't really rely on this
pseudo extradata that libavformat constructs.
That this code is run only with extradata_size set makes no sense at
least in the h264 code and was an oversight.
More information about the ffmpeg-devel