]> git.sesse.net Git - vlc/commitdiff
avcodec: fix codec mapping array size check
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 28 Dec 2012 10:53:30 +0000 (12:53 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 30 Dec 2012 11:24:17 +0000 (13:24 +0200)
modules/codec/avcodec/audio.c

index 9c65abc1c95043e6f276bf3fa67bc7773a748598..272038a3f9bf3f8b83424d625bd36bcc893ce525 100644 (file)
@@ -432,7 +432,7 @@ vlc_fourcc_t GetVlcAudioFormat( int fmt )
         [AV_SAMPLE_FMT_FLTP]  = VLC_CODEC_FL32,
         [AV_SAMPLE_FMT_DBLP]  = VLC_CODEC_FL64,
     };
-    if( sizeof(fcc) / sizeof(fcc[0]) < (unsigned)fmt )
+    if( (sizeof(fcc) / sizeof(fcc[0])) > (unsigned)fmt )
         return fcc[fmt];
     return VLC_CODEC_S16N;
 }