aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2004-05-18 02:33:27 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2004-05-18 02:33:27 +0000
commit12cccabd0fedca3846f1381971aaffd30374bede (patch)
tree68e16b530749b9a19f7df34f9e42714526f3333c
parenta8eb52a8c32536a1b93bebe2d0372edf1a520501 (diff)
downloadffmpeg-12cccabd0fedca3846f1381971aaffd30374bede.tar.gz
* IEC DV seems to accept SMPTE way of tagging 16:9 too.
Originally committed as revision 3139 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/dv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 71033d2718..4815674122 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -582,9 +582,11 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
avctx->height = sys->height;
avctx->pix_fmt = sys->pix_fmt;
+ /* finding out SAR is a little bit messy */
vsc_pack = dv_extract_pack(frame, dv_video_control);
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];
size = sys->frame_size;