[FFmpeg-devel] [PATCH] avformat/oggparseogm: sync avctx w/ codecpar
jamrial at gmail.com
Fri Feb 8 23:21:25 EET 2019
On 2/8/2019 5:51 PM, Carl Eugen Hoyos wrote:
> 2019-02-08 21:07 GMT+01:00, James Almer <jamrial at gmail.com>:
>> On 2/8/2019 12:17 AM, Chris Cunningham wrote:
>>> On Wed, Feb 6, 2019 at 6:03 PM James Almer <jamrial at gmail.com> wrote:
>>>> Can a valid ogm stream contain more than one header packet?
>>> Looking at ogg_packet oggdec.c, we read headers until hitting the first
>>> non-header (counted in ogg stream field nb_headers), so multiple headers
>>> per stream is probably ok.
>> Probably ok as in our code currently allows it? Because if the spec
>> disallows it, then that should be changed.
> If our current code allows it, it should not be changed without
> a good reason and certainly not in a patch that fixes an abort.
Chris' patch is making the demuxer reinitialize the context due to
parameter changes taken from extra headers potentially found in the
bitstream. In contrast, my suggestion is to instead make the demuxer
skip said superfluous/duplicate headers if it turns out that extra
parameter headers are not expected, which seems to be the case given
that all the headers regardless of kind are expected to show up before
the very first data packet.
Both approaches will fix an assert in the parser as autoinserted by the
generic libavformat code, but it's not strictly limited to that.
More information about the ffmpeg-devel