[vlc-devel] commit: Fix compilation with old ffmpeg. ( Rémi Duraffort )

git version control git at videolan.org
Tue Aug 19 22:24:25 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Aug 19 22:16:13 2008 +0200| [98ea2ba6901b56eea1e518ded8ad5779b6d040d4] | committer: Rémi Duraffort 

Fix compilation with old ffmpeg.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98ea2ba6901b56eea1e518ded8ad5779b6d040d4
---

 modules/video_filter/imgresample.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/video_filter/imgresample.c b/modules/video_filter/imgresample.c
index cbca27e..eef97c7 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;
 




More information about the vlc-devel mailing list