diff options
author | Peter Ross <pross@xvid.org> | 2011-04-01 23:23:28 +1100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-05-01 19:35:55 +0200 |
commit | 406629150cae78a15d7c04b049511b03740b6bfc (patch) | |
tree | d9e1be8d4eaaef365716f90b45768b952d45ae39 /libavcodec | |
parent | 3777ea13fbf690003f8b0d83a8bffb6e1d71c3df (diff) | |
download | ffmpeg-406629150cae78a15d7c04b049511b03740b6bfc.tar.gz |
DPX decoder: read sample aspect ratio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dpx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 82891d6b42..0722dd07ef 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, unsigned int rgbBuffer; - if (avpkt->size <= 0x324) { + if (avpkt->size <= 1634) { av_log(avctx, AV_LOG_ERROR, "Packet too small for DPX header\n"); return AVERROR_INVALIDDATA; } @@ -106,6 +106,10 @@ static int decode_frame(AVCodecContext *avctx, avctx->bits_per_raw_sample = bits_per_color = buf[0]; + buf += 825; + avctx->sample_aspect_ratio.num = read32(&buf, endian); + avctx->sample_aspect_ratio.den = read32(&buf, endian); + switch (descriptor) { case 51: // RGBA elements = 4; |