X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpegaudiodec.c;h=7c98cde5874b5ac037dcbd756dc02250eae9a98a;hb=0a23067ab41326dfa1da41d18923ea8547a51ff5;hp=56a48ce71bd8b6c05a65866545b5be3ee289bbb4;hpb=15285d8fc528483aebf4ae7c522ea33c558f503c;p=ffmpeg diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 56a48ce71bd..7c98cde5874 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1809,7 +1809,7 @@ static int decode_frame(AVCodecContext * avctx, av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); return -1; }else if(s->frame_size < buf_size){ - av_log(avctx, AV_LOG_ERROR, "incorrect frame size\n"); + av_log(avctx, AV_LOG_DEBUG, "incorrect frame size - multiple frames in buffer?\n"); buf_size= s->frame_size; } @@ -2050,82 +2050,68 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, #if !CONFIG_FLOAT #if CONFIG_MP1_DECODER -AVCodec ff_mp1_decoder = -{ - "mp1", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP1, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), +AVCodec ff_mp1_decoder = { + .name = "mp1", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP1, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, + .capabilities = CODEC_CAP_PARSE_ONLY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), }; #endif #if CONFIG_MP2_DECODER -AVCodec ff_mp2_decoder = -{ - "mp2", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP2, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), +AVCodec ff_mp2_decoder = { + .name = "mp2", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP2, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, + .capabilities = CODEC_CAP_PARSE_ONLY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), }; #endif #if CONFIG_MP3_DECODER -AVCodec ff_mp3_decoder = -{ - "mp3", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), +AVCodec ff_mp3_decoder = { + .name = "mp3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame, + .capabilities = CODEC_CAP_PARSE_ONLY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), }; #endif #if CONFIG_MP3ADU_DECODER -AVCodec ff_mp3adu_decoder = -{ - "mp3adu", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3ADU, - sizeof(MPADecodeContext), - decode_init, - NULL, - NULL, - decode_frame_adu, - CODEC_CAP_PARSE_ONLY, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), +AVCodec ff_mp3adu_decoder = { + .name = "mp3adu", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3ADU, + .priv_data_size = sizeof(MPADecodeContext), + .init = decode_init, + .decode = decode_frame_adu, + .capabilities = CODEC_CAP_PARSE_ONLY, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), }; #endif #if CONFIG_MP3ON4_DECODER -AVCodec ff_mp3on4_decoder = -{ - "mp3on4", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_MP3ON4, - sizeof(MP3On4DecodeContext), - decode_init_mp3on4, - NULL, - decode_close_mp3on4, - decode_frame_mp3on4, - .flush= flush, - .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"), +AVCodec ff_mp3on4_decoder = { + .name = "mp3on4", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_MP3ON4, + .priv_data_size = sizeof(MP3On4DecodeContext), + .init = decode_init_mp3on4, + .close = decode_close_mp3on4, + .decode = decode_frame_mp3on4, + .flush = flush, + .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"), }; #endif #endif