Skip to content
Snippets Groups Projects
Commit 40662915 authored by Peter Ross's avatar Peter Ross Committed by Reinhard Tartler
Browse files

DPX decoder: read sample aspect ratio

parent 3777ea13
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx,
unsigned int rgbBuffer; unsigned int rgbBuffer;
if (avpkt->size <= 0x324) { if (avpkt->size <= 1634) {
av_log(avctx, AV_LOG_ERROR, "Packet too small for DPX header\n"); av_log(avctx, AV_LOG_ERROR, "Packet too small for DPX header\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
...@@ -106,6 +106,10 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -106,6 +106,10 @@ static int decode_frame(AVCodecContext *avctx,
avctx->bits_per_raw_sample = avctx->bits_per_raw_sample =
bits_per_color = buf[0]; 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) { switch (descriptor) {
case 51: // RGBA case 51: // RGBA
elements = 4; elements = 4;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment