[FFmpeg-devel] [PATCH 2/2] avformat/movenc: support Opus packets with more than 60ms of audio when writing the Sample Group Description Box

James Almer jamrial at gmail.com
Fri Aug 24 18:41:04 EEST 2018


On 8/24/2018 12:33 PM, Carl Eugen Hoyos wrote:
> 2018-08-24 17:31 GMT+02:00, James Almer <jamrial at gmail.com>:
>> On 8/24/2018 7:19 AM, Carl Eugen Hoyos wrote:
>>> 2018-08-24 0:17 GMT+02:00, James Almer <jamrial at gmail.com>:
>>>> Fixes assertion failures when trying to mux such streams.
>>>
>>> Shouldn't this be 1/2?
>>>
>>> And does this assert now for libavformat users that use
>>> new libopus (but not libavcodec) or do I misunderstand?
>>
>> This asserts for any stream with >= 80ms packets. It doesn't need to be
>> a direct encode from the libopus wrapper, since it can also happen
>> during be a remux.
> 
> Doesn't this indicate that the assert is wrong?
> (That invalid input can trigger the assert)

Invalid input (say, a packet reporting a frame size of the equivalent of
1ms) would assert before and after this patch. Do you consider an assert
that triggers on invalid input to be wrong? I thought that was the
entire point of one...

If you prefer i can remove the entire assert altogether. Or maybe
replace it with a normal check that returns an error instead. Otherwise
I'm not sure what's your concern.


More information about the ffmpeg-devel mailing list