summaryrefslogtreecommitdiff
path: root/libavformat/mp3dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 20:17:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 20:21:16 +0100
commit2d37c57f3e9d58916b1247e0f335065415ce1364 (patch)
treef5873fa404731ec2cbf3a94b0f8fa8f0a73644e9 /libavformat/mp3dec.c
parente48ff13ba722f2ac37681eeea1b7813292ac87fa (diff)
parentfe99c52fa99e44961a09cd1324aefd492b797fc8 (diff)
Merge commit 'fe99c52fa99e44961a09cd1324aefd492b797fc8'
* commit 'fe99c52fa99e44961a09cd1324aefd492b797fc8': mp3: Properly use AVCodecContext API Conflicts: libavformat/mp3dec.c See: 6ad42b3e15478284321dd285acaf189a16590854 See: b851bc20c6931c084710e69f7eec30d8c1bdb68e Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r--libavformat/mp3dec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 4b919b0880..d2498a049f 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -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;