[FFmpeg-devel] [PATCH] mov: Skip computing SAR from invalid display matrix elements

Vittorio Giovara vittorio.giovara at gmail.com
Wed Mar 31 15:06:19 EEST 2021


On Tue, Mar 30, 2021 at 11:28 PM Carl Eugen Hoyos <ceffmpeg at gmail.com>
wrote:

> Am Di., 30. März 2021 um 19:24 Uhr schrieb Vittorio Giovara
> <vittorio.giovara at gmail.com>:
> >
> > Hello,
> > I was debugging an issue with a video file containing an invalid
> > display matrix, probably produced by a non conforming software.
> >
> > The content of the matrix is:
> > 00000000:            0       65536           0
> > 00000001:           -1           0           0
> > 00000002:            0           0  1073741824
> >
> > The -1 (stored as 4294967295) was probably a 1 shifted 32 times instead
> > of 16. The problem is that this value is bypassing the validation check
> > in the code below, and the resulting computed SAR value becomes 1:65536.
> >
> > This change interprets extremely low entries as invalid and makes sure
> > to skip them in the SAR computation. This passes fate, but I haven't been
> > able to test this extensively.
> > Please see the attached patch, any feedback or better solution is
> welcome.
>
> Is this related to ticket #7277?
>
> Carl Eugen
>

Hello,
this patch doesn't seem to affect the sample attached to the bug in one way
or another.

>From a cursory look, that sample should apply the trak display matrix
instead of the movie one, but I am unsure of the ramification of such a
change for the generic case, since we may risk breaking other samples that
expect the current matrix ordering.
-- 
Vittorio


More information about the ffmpeg-devel mailing list