[FFmpeg-devel] [PATCH 2/2] mp3dec: fix truncating packet error message while decoding a complete MP3.

Clément Bœsch ubitux at gmail.com
Thu Jan 26 13:53:44 CET 2012


The MP3 demuxer split the data in packets of 1024B which are later split
in MP3 frames by the MPEG audio parser. The last read is "truncated",
but this should not raise any error.

Solution-by: Michael Niedermayer
---
 libavformat/mp3dec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index aa48787..b5ed83e 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -150,6 +150,7 @@ static int mp3_read_header(AVFormatContext *s,
     // lcm of all mp3 sample rates
     avpriv_set_pts_info(st, 64, 1, 14112000);
 
+    s->pb->maxsize = -1;
     off = avio_tell(s->pb);
 
     if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
-- 
1.7.8.4



More information about the ffmpeg-devel mailing list