[SCM] libav/experimental: * IEC DV seems to accept SMPTE way of tagging 16:9 too.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:40:25 UTC 2013


The following commit has been merged in the experimental branch:
commit 12cccabd0fedca3846f1381971aaffd30374bede
Author: Roman Shaposhnik <roman at shaposhnik.org>
Date:   Tue May 18 02:33:27 2004 +0000

       * IEC DV seems to accept SMPTE way of tagging 16:9 too.
    
    Originally committed as revision 3139 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/dv.c b/libavformat/dv.c
index 71033d2..4815674 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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list