On Fri, 8 Feb 2013 18:03:50 -0500, Justin Ruggles <[email protected]> wrote: > --- > libavcodec/mpegaudiodec.c | 40 ++++++++++++++++++++-------------------- > 1 files changed, 20 insertions(+), 20 deletions(-) > > diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c > index 3524cff..d1460c8 100644 > --- a/libavcodec/mpegaudiodec.c > +++ b/libavcodec/mpegaudiodec.c > @@ -84,7 +84,7 @@ typedef struct MPADecodeContext { > AVCodecContext* avctx; > MPADSPContext mpadsp; > AVFloatDSPContext fdsp; > - AVFrame frame; > + AVFrame *frame; > } MPADecodeContext; > > #if CONFIG_FLOAT > @@ -448,9 +448,6 @@ static av_cold int decode_init(AVCodecContext * avctx) > if (avctx->codec_id == AV_CODEC_ID_MP3ADU) > s->adu_mode = 1; > > - avcodec_get_frame_defaults(&s->frame); > - avctx->coded_frame = &s->frame; > - > return 0; > } > > @@ -1612,12 +1609,14 @@ static int mp_decode_frame(MPADecodeContext *s, > OUT_INT **samples, > > /* get output buffer */ > if (!samples) { > - s->frame.nb_samples = s->avctx->frame_size; > - if ((ret = ff_get_buffer(s->avctx, &s->frame)) < 0) { > + if (!s->frame) > + return AVERROR_BUG;
I think av_assert0 would be more appropriate here. Otherwise looks ok. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
