diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-13 15:21:00 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-13 15:22:35 +0400 |
commit | 65da7007043cf4fb99b72c7f823cfc15e429b45f (patch) | |
tree | baf5a652e66f919f462cc80c6d8fe0d247788475 /libavcodec/mlpdec.c | |
parent | afe30fe0600824b0dcda8318f09a5a4e376b99c3 (diff) | |
parent | 1b9b6d6e5ea556b6d307f9d473f54f6406fdc3c8 (diff) |
Merge commit '1b9b6d6e5ea556b6d307f9d473f54f6406fdc3c8'
* commit '1b9b6d6e5ea556b6d307f9d473f54f6406fdc3c8':
qcelp: decode directly to the user-provided AVFrame
pcm-bluray: decode directly to the user-provided AVFrame
nellymoser: decode directly to the user-provided AVFrame
mpc7/8: decode directly to the user-provided AVFrame
mpegaudio: decode directly to the user-provided AVFrame
mlp/truehd: decode directly to the user-provided AVFrame
Conflicts:
libavcodec/mpc7.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index f437afa131..8a4eb5f6f8 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -118,7 +118,6 @@ typedef struct SubStream { typedef struct MLPDecodeContext { AVCodecContext *avctx; - AVFrame frame; /// Current access unit being read has a major sync. int is_major_sync_unit; @@ -271,9 +270,6 @@ static av_cold int mlp_decode_init(AVCodecContext *avctx) m->substream[substr].lossless_check_data = 0xffffffff; ff_mlpdsp_init(&m->dsp); - avcodec_get_frame_defaults(&m->frame); - avctx->coded_frame = &m->frame; - return 0; } @@ -1005,7 +1001,7 @@ static void rematrix_channels(MLPDecodeContext *m, unsigned int substr) /** Write the audio data into the output buffer. */ static int output_data(MLPDecodeContext *m, unsigned int substr, - void *data, int *got_frame_ptr) + AVFrame *frame, int *got_frame_ptr) { AVCodecContext *avctx = m->avctx; SubStream *s = &m->substream[substr]; @@ -1021,13 +1017,13 @@ static int output_data(MLPDecodeContext *m, unsigned int substr, } /* get output buffer */ - m->frame.nb_samples = s->blockpos; - if ((ret = ff_get_buffer(avctx, &m->frame)) < 0) { + frame->nb_samples = s->blockpos; + if ((ret = ff_get_buffer(avctx, frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return ret; } - data_32 = (int32_t *)m->frame.data[0]; - data_16 = (int16_t *)m->frame.data[0]; + data_32 = (int32_t *)frame->data[0]; + data_16 = (int16_t *)frame->data[0]; for (i = 0; i < s->blockpos; i++) { for (out_ch = 0; out_ch <= s->max_matrix_channel; out_ch++) { @@ -1040,8 +1036,7 @@ static int output_data(MLPDecodeContext *m, unsigned int substr, } } - *got_frame_ptr = 1; - *(AVFrame *)data = m->frame; + *got_frame_ptr = 1; return 0; } |