]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mp3dec.c
Merge commit '217e4ff4d1f845b76e44634e29371cd09313d1c2'
[ffmpeg] / libavformat / mp3dec.c
index 4b919b0880b8a675097b9320fc57a850d832a38c..d2498a049f13958da3999dac95d2eff3404d8be3 100644 (file)
@@ -32,6 +32,7 @@
 #include "id3v1.h"
 #include "replaygain.h"
 
+#include "libavcodec/avcodec.h"
 #include "libavcodec/mpegaudiodecheader.h"
 
 #define XING_FLAG_FRAMES 0x01
@@ -64,7 +65,7 @@ static int mp3_read_probe(AVProbeData *p)
     AVCodecContext *avctx = avcodec_alloc_context3(NULL);
 
     if (!avctx)
-        return 0;
+        return AVERROR(ENOMEM);
 
     buf0 = p->buf;
     end = p->buf + p->buf_size - sizeof(uint32_t);
@@ -82,7 +83,8 @@ static int mp3_read_probe(AVProbeData *p)
         for(frames = 0; buf2 < end; frames++) {
             int dummy;
             header = AV_RB32(buf2);
-            fsize = avpriv_mpa_decode_header(avctx, header, &dummy, &dummy, &dummy, &dummy);
+            fsize = avpriv_mpa_decode_header(avctx, header,
+                                             &dummy, &dummy, &dummy, &dummy);
             if(fsize < 0)
                 break;
             buf2 += fsize;