[FFmpeg-devel] [PATCH] DV: Use profile[1] detection hack only for stype 0.

Michael Niedermayer michaelni at gmx.at
Wed Mar 7 04:52:55 CET 2012


On Tue, Mar 06, 2012 at 09:39:09PM +0100, Reimar Döffinger wrote:
> 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 <Reimar.Doeffinger at gmx.de>
> ---
>  libavcodec/dvdata.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c
> index 5ec1145..feb2929 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++)
> -- 

cc-ing roman


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120307/f8842868/attachment.asc>


More information about the ffmpeg-devel mailing list