X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpegaudio_parser.c;h=42f470685ada5711215be01ba49194fadc6c4929;hb=7b7f8d3ed03d5d8f6c042644bf82a86ae2f996e4;hp=79dbf635b40ee309395870a35f7d343612332beb;hpb=46a16ca15a68bfd7341dd9783ecf39bbdf80d08e;p=ffmpeg diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 79dbf635b40..42f470685ad 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -64,7 +64,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, }else{ while(icodec_id; state= (state<<8) + buf[i++]; @@ -90,6 +90,16 @@ static int mpegaudio_parse(AVCodecParserContext *s1, avctx->bit_rate += (bit_rate - avctx->bit_rate) / (s->header_count - header_threshold); } } + + if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) { + s->frame_size = 0; + next = buf_size; + } else if (codec_id == AV_CODEC_ID_MP3ADU) { + av_log(avctx, AV_LOG_ERROR, + "MP3ADU full parser not implemented"); + return AVERROR_PATCHWELCOME; + } + break; } } @@ -110,7 +120,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecParser ff_mpegaudio_parser = { - .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3 }, + .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3, AV_CODEC_ID_MP3ADU }, .priv_data_size = sizeof(MpegAudioParseContext), .parser_parse = mpegaudio_parse, .parser_close = ff_parse_close,