[FFmpeg-devel] [PATCH] dpx: sanitize aspect ratio.

Nicolas George nicolas.george at normalesup.org
Thu Jun 28 21:58:41 CEST 2012

Le primidi 11 messidor, an CCXX, Paul B Mahol a écrit :
> I changed my mind, shouldn't this code be in more general place?

I hesitated when writing the patch, but here is what I thought:

I do not like squashing strange values into sane default ones when I do not
know where the strange value come from. This is called defensive programming
and it has a tendency to hide bugs that would be better found and fixed.

Here in the DPX decoder, I know where the strange values come: straight from
the file, so I know that by reducing them I am just working around a file
that is bogus / used an undocumented feature of the format (I checked the

In a more general place, I would be fixing that case, but also silencing
problems with, for example, a decoder that decoded with the wrong


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120628/78558a9d/attachment.asc>

More information about the ffmpeg-devel mailing list