X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fmpegaudio_parser.c;h=42f470685ada5711215be01ba49194fadc6c4929;hb=9d5017a20c26b98bdd6fec29f3eaa465a779e24c;hp=79dbf635b40ee309395870a35f7d343612332beb;hpb=4e40e6128769246ee101e1990be42880a07dda18;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,