aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dvdata.h
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2007-07-17 04:06:03 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2007-07-17 04:06:03 +0000
commit263c2412269c954726b13e4fa7f120abe10c182f (patch)
treea3a25e80b993f4338f45076a557094ffe0a721f8 /libavcodec/dvdata.h
parentf1639f69b49ab5a3e61cbe8f61a6a74cc61f95a6 (diff)
downloadffmpeg-263c2412269c954726b13e4fa7f120abe10c182f.tar.gz
* making profile selection a bit more tolerant to the badly broken streams
Originally committed as revision 9710 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dvdata.h')
-rw-r--r--libavcodec/dvdata.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dvdata.h b/libavcodec/dvdata.h
index 19a9501db5..bd2d41a24b 100644
--- a/libavcodec/dvdata.h
+++ b/libavcodec/dvdata.h
@@ -2665,14 +2665,14 @@ static inline const DVprofile* dv_frame_profile(uint8_t* frame)
{
if ((frame[3] & 0x80) == 0) { /* DSF flag */
/* it's an NTSC format */
- if ((frame[80*5 + 48 + 3] & 0x4)) { /* 4:2:2 sampling */
+ if ((frame[80*5 + 48 + 3] & 0x4) && (frame[80*5 + 48] == dv_video_source)) { /* 4:2:2 sampling */
return &dv_profiles[3]; /* NTSC 50Mbps */
} else { /* 4:1:1 sampling */
return &dv_profiles[0]; /* NTSC 25Mbps */
}
} else {
/* it's a PAL format */
- if ((frame[80*5 + 48 + 3] & 0x4)) { /* 4:2:2 sampling */
+ if ((frame[80*5 + 48 + 3] & 0x4) && (frame[80*5 + 48] == dv_video_source)) { /* 4:2:2 sampling */
return &dv_profiles[4]; /* PAL 50Mbps */
} else if ((frame[5] & 0x07) == 0) { /* APT flag */
return &dv_profiles[1]; /* PAL 25Mbps 4:2:0 */