avcodec:fourcc: return VLC_CODEC_UNKNOWN directly instead of 0
authorSteve Lhomme <robux4@videolabs.io>
Fri, 7 Jul 2017 07:35:44 +0000 (09:35 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Jul 2017 09:09:50 +0000 (11:09 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/avcodec/fourcc.c
modules/demux/avformat/demux.c

index 4f2a3cd..3394920 100644 (file)
@@ -547,5 +547,5 @@ vlc_fourcc_t GetVlcFourcc( unsigned i_ffmpeg_codec )
         if( spu_codecs[i].i_codec == i_ffmpeg_codec )
             return spu_codecs[i].i_fourcc;
     }
-    return 0;
+    return VLC_CODEC_UNKNOWN;
 }
index 5bee83b..0d299a9 100644 (file)
@@ -358,9 +358,6 @@ int OpenDemux( vlc_object_t *p_this )
         es_out_id_t  *es = NULL;
         es_format_t es_fmt;
         const char *psz_type = "unknown";
-        vlc_fourcc_t fcc = GetVlcFourcc( cp->codec_id );
-        if( !fcc )
-            fcc = VLC_CODEC_UNKNOWN;
 
         /* Do not use the cover art as a stream */
         if( s->disposition == AV_DISPOSITION_ATTACHED_PIC )
@@ -369,6 +366,7 @@ int OpenDemux( vlc_object_t *p_this )
             continue;
         }
 
+        vlc_fourcc_t fcc = GetVlcFourcc( cp->codec_id );
         switch( cp->codec_type )
         {
         case AVMEDIA_TYPE_AUDIO: