2016-09-26 8:42 GMT+02:00 Jan Ekstrom <jee...@gmail.com>:
> On Sep 26, 2016 09:29, "Carl Eugen Hoyos" <ceffm...@gmail.com> wrote:
>>
>> 2016-09-26 1:52 GMT+02:00 Jan Ekström <jee...@gmail.com>:
>>
>> If this fixes anything (I am not sure I understand: Are you changing a
>> type which introduces a possible undefined behaviour, so you add an
>> additional check at the same time?) it should be part of above new
>> patch imo (or an independent patch).
>
> The specification notes that width and height are uint32 in MXF. Thus the
> old type of "int" was incorrect. The width and height of codecpar are "int"
> so by fixing the type it can overflow (you'd get negative values), and thus
> have to be capped.
>
> The old code would have had thus an overflow happen naturally in the
> case of a large enough unsigned integer as the value would have been
> read into an int.

I thought no overflow happens in that case but it does not really matter:
FFmpeg ignores even 16bit width / height (for msb set).

Carl Eugen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to