diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-09-27 11:43:44 +0300 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-09-27 11:43:44 +0300 |
commit | a2cc9a19b5e8193426c6626a1544a623f0da7a73 (patch) | |
tree | 3ec7efdf610b085dbf8eff24947a919618f76371 /src | |
parent | 97cec62e0abfacdd0f89f211583f018f59a74c69 (diff) | |
download | xine-lib-a2cc9a19b5e8193426c6626a1544a623f0da7a73.tar.gz xine-lib-a2cc9a19b5e8193426c6626a1544a623f0da7a73.tar.bz2 |
ffmpeg audio: make sure decode_buffer is allocated only once
imported patch 10119.diff
Diffstat (limited to 'src')
-rw-r--r-- | src/combined/ffmpeg/ff_audio_decoder.c | 3 |
1 files changed, 1 insertions, 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; } |