Commit 12cccabd authored by Roman Shaposhnik's avatar Roman Shaposhnik

* IEC DV seems to accept SMPTE way of tagging 16:9 too.

Originally committed as revision 3139 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a8eb52a8
...@@ -582,9 +582,11 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame) ...@@ -582,9 +582,11 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
avctx->height = sys->height; avctx->height = sys->height;
avctx->pix_fmt = sys->pix_fmt; avctx->pix_fmt = sys->pix_fmt;
/* finding out SAR is a little bit messy */
vsc_pack = dv_extract_pack(frame, dv_video_control); vsc_pack = dv_extract_pack(frame, dv_video_control);
apt = frame[4] & 0x07; apt = frame[4] & 0x07;
is16_9 = (vsc_pack && (vsc_pack[2] & 0x07) == (apt?0x02:0x07)); is16_9 = (vsc_pack && ((vsc_pack[2] & 0x07) == 0x02 ||
(!apt && (vsc_pack[2] & 0x07) == 0x07)));
avctx->sample_aspect_ratio = sys->sar[is16_9]; avctx->sample_aspect_ratio = sys->sar[is16_9];
size = sys->frame_size; size = sys->frame_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment