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. Jan _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel