From 6ec688e1bc76dd93151cbca1c340162ae4b10d77 Mon Sep 17 00:00:00 2001 From: nu774 Date: Fri, 9 May 2014 23:05:42 +0900 Subject: mp3: enable packed main_data decoding in MP4 14496-3 suggests packing main_data of MP3 that is usually scattered into multiple frames due to bit reservoir. However, after packing main_data into a access unit, bitrate index in the MPEG audio frame header doesn't match with actual frame size. In order to accept this, this patch removes unnecessary frame size checking on mp3 decoder. Also, mov demuxer was changed to use MP3 parser only on special cases (QT MOV with specific sample description) to avoid re-packetizing. Signed-off-by: Luca Barbato --- libavcodec/mpegaudiodec_template.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'libavcodec/mpegaudiodec_template.c') diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index 08dd18bf2e..293316b944 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -1647,13 +1647,6 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, if (!avctx->bit_rate) avctx->bit_rate = s->bit_rate; - if (s->frame_size <= 0 || s->frame_size > buf_size) { - av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); - return AVERROR_INVALIDDATA; - } else if (s->frame_size < buf_size) { - buf_size= s->frame_size; - } - s->frame = data; ret = mp_decode_frame(s, NULL, buf, buf_size); -- cgit v1.2.3