From a2cc9a19b5e8193426c6626a1544a623f0da7a73 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 27 Sep 2011 11:43:44 +0300 Subject: ffmpeg audio: make sure decode_buffer is allocated only once imported patch 10119.diff --- src/combined/ffmpeg/ff_audio_decoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index 754de45be..ec4d01ccd 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -288,8 +288,6 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) this->context->codec_tag = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC); this->size = 0; - - this->decode_buffer = malloc16 (AVCODEC_MAX_AUDIO_FRAME_SIZE); } } else { @@ -535,6 +533,7 @@ static audio_decoder_t *ff_audio_open_plugin (audio_decoder_class_t *class_gen, ff_audio_ensure_buffer_size(this, AUDIOBUFSIZE); this->context = avcodec_alloc_context(); + this->decode_buffer = malloc16 (AVCODEC_MAX_AUDIO_FRAME_SIZE); return &this->audio_decoder; } -- cgit v1.2.3