[FFmpeg-devel] [PATCH 4/4] avformat/mov: Stash mfra size if we're reading it anyway
James Almer
jamrial at gmail.com
Tue Sep 1 19:11:05 EEST 2020
On 9/1/2020 1:06 PM, Derek Buitenhuis wrote:
> On 01/09/2020 17:02, James Almer wrote:
>> How else would you read 32bit signed integers using AVIOContext function
>> helpers if not with avio_rb32()?
>
> The mfra size is not signed. It is an unsigned 32-bit integer.
>
> Spec (mfro is the last part of the mfra):
>
> aligned(8) class MovieFragmentRandomAccessOffsetBox
> extends FullBox(‘mfro’, version, 0) {
> unsigned int(32) size;
> }
>
> - Derek
Oh, you mean how it worked with mfra_size being declared as an int32_t.
I was just mentioning why there was a <= 0 check for it. And I guess
because no mfra box parsed by lavf was ever bigger than ~2gb, so it
never failed.
But yes, it was a bug that you're fixing in this set.
(For that matter, size could in theory also be a 64bit integer according
to the spec).
More information about the ffmpeg-devel
mailing list