From 8fbf825ecc3241998cc3e828dbf1c9eddd4ab356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Tue, 6 Mar 2012 21:36:58 +0100 Subject: [PATCH] DV: Use profile[1] detection hack only for stype 0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two samples both have stype 0. Without this extra check, the code breaks 4:2:2 dvsd (stype 4), since that has the same resolution. Signed-off-by: Reimar Döffinger --- libavcodec/dvdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c index 4d08d427f9..8c06be7c97 100644 --- a/libavcodec/dvdata.c +++ b/libavcodec/dvdata.c @@ -300,7 +300,7 @@ const DVprofile* avpriv_dv_frame_profile2(AVCodecContext* codec, const DVprofile return &dv_profiles[2]; } - if(codec && codec->codec_tag==AV_RL32("dvsd") && codec->width==720 && codec->height==576) + if(stype == 0 && codec && codec->codec_tag==AV_RL32("dvsd") && codec->width==720 && codec->height==576) return &dv_profiles[1]; for (i = 0; i < FF_ARRAY_ELEMS(dv_profiles); i++)