[vlc-commits] avcodec: fix codec mapping array size check

Ilkka Ollakka git at videolan.org
Sun Dec 30 13:13:03 CET 2012


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Dec 28 12:53:30 2012 +0200| [99ab06c7ffe189e81118f6122b1661c6c7af033c] | committer: Ilkka Ollakka

avcodec: fix codec mapping array size check

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

 modules/codec/avcodec/audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 9c65abc..272038a 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -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;
 }



More information about the vlc-commits mailing list