summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-27 13:54:25 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-27 22:06:32 -0400
commit512557b291d97ce72dc00e8c1e9a8c1c782fade9 (patch)
treea3574a56bbaa101a98339e9a25e98aaae40d43c1 /libavcodec/mpegaudiodec.c
parentcd816d9bbb3e248b5805b8f4aff67cfec12e30f9 (diff)
avcodec: remove avcodec_parse_frame and deprecate associated elements.
The documentation for CODEC_CAP_PARSE_ONLY and AVCodecContext.parse_only indicates that they are utilized through avcodec_parse_frame(), which was never actually implemented.
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 13a3c56447..3aef5fb08d 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -279,7 +279,11 @@ static av_cold int decode_init(AVCodecContext * avctx)
avctx->sample_fmt= OUT_FMT;
s->err_recognition = avctx->err_recognition;
+#if FF_API_PARSE_FRAME
if (!init && !avctx->parse_only) {
+#else
+ if (!init) {
+#endif
int offset;
/* scale factors table for layer 1/2 */
@@ -1869,10 +1873,12 @@ static int decode_frame_adu(AVCodecContext *avctx, void *data, int *data_size,
s->frame_size = len;
+#if FF_API_PARSE_FRAME
if (avctx->parse_only)
out_size = buf_size;
else
- out_size = mp_decode_frame(s, out_samples, buf, buf_size);
+#endif
+ out_size = mp_decode_frame(s, out_samples, buf, buf_size);
*data_size = out_size;
return buf_size;
@@ -2110,7 +2116,9 @@ AVCodec ff_mp1_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
};
@@ -2123,7 +2131,9 @@ AVCodec ff_mp2_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
};
@@ -2136,7 +2146,9 @@ AVCodec ff_mp3_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
};
@@ -2149,7 +2161,9 @@ AVCodec ff_mp3adu_decoder = {
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
+#if FF_API_PARSE_FRAME
.capabilities = CODEC_CAP_PARSE_ONLY,
+#endif
.flush = flush,
.long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
};