diff options
-rw-r--r-- | src/combined/ffmpeg/ff_audio_decoder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index 269342ddb..34ccadeee 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -178,8 +178,6 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) return; } - this->context = avcodec_alloc_context(); - if(buf->decoder_flags & BUF_FLAG_STDHEADER) { this->audio_sample_rate = buf->decoder_info[1]; this->audio_channels = buf->decoder_info[3]; @@ -536,6 +534,8 @@ 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(); + return &this->audio_decoder; } |