From 98ea2ba6901b56eea1e518ded8ad5779b6d040d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Duraffort?= Date: Tue, 19 Aug 2008 22:16:13 +0200 Subject: [PATCH] Fix compilation with old ffmpeg. --- modules/video_filter/imgresample.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/video_filter/imgresample.c b/modules/video_filter/imgresample.c index cbca27ea35..eef97c737d 100644 --- a/modules/video_filter/imgresample.c +++ b/modules/video_filter/imgresample.c @@ -87,18 +87,15 @@ struct filter_sys_t int OpenFilter( vlc_object_t *p_this ) { filter_t *p_filter = (filter_t *)p_this; - int i_ffmpeg_chroma[2], i_vlc_chroma[2], i; + int i_ffmpeg_chroma[2]; /* * Check the source chroma first, then the destination chroma */ - i_vlc_chroma[0] = p_filter->fmt_in.video.i_chroma; - i_vlc_chroma[1] = p_filter->fmt_out.video.i_chroma; - for( i = 0; i < 2; i++ ) - { - i_ffmpeg_chroma[i] = GetFfmpegChroma( i_vlc_chroma[i] ); - if( i_ffmpeg_chroma[i] < 0 ) return VLC_EGENERIC; - } + if( GetFfmpegChroma( &i_ffmpeg_chroma[0], p_filter->fmt_in.video ) == VLC_EGENERIC ) + return VLC_EGENERIC; + if( GetFfmpegChroma( &i_ffmpeg_chroma[1], p_filter->fmt_out.video ) == VLC_EGENERIC ) + return VLC_EGENERIC; p_filter->pf_video_filter = Conversion_Filter;