[FFmpeg-devel] [PATCH 1/2] pcx: read sample aspect ratio
Paul B Mahol
onemda at gmail.com
Fri Oct 12 08:59:34 CEST 2012
On 10/11/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Oct 11, 2012 at 10:59:01AM +0000, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>> libavcodec/pcx.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
>> index 06f0f0f..9168aef 100644
>> --- a/libavcodec/pcx.c
>> +++ b/libavcodec/pcx.c
>> @@ -102,6 +102,10 @@ static int pcx_decode_frame(AVCodecContext *avctx,
>> void *data, int *data_size,
>> ymin = bytestream2_get_le16u(&gb);
>> xmax = bytestream2_get_le16u(&gb);
>> ymax = bytestream2_get_le16u(&gb);
>> + avctx->sample_aspect_ratio.num = bytestream2_get_le16u(&gb);
>> + avctx->sample_aspect_ratio.den = bytestream2_get_le16u(&gb);
>
>> + if (avctx->sample_aspect_ratio.den == 0)
>> + avctx->sample_aspect_ratio.den = 1;
>
> why is this needed ?
> it would give odd results if num was 10 for example
something in filters trip over 0/0 ratio, i think it needs changing den only
in that case.
>
> rest LGTM
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> DNS cache poisoning attacks, popular search engine, Google internet
> authority
> dont be evil, please
>
More information about the ffmpeg-devel
mailing list