| Index: media/filters/ffmpeg_audio_decoder.cc
|
| diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
|
| index e44880a74941a222c4c98c69f793394e204ca7f7..808904c7a7f7fd5f7bf03c96f2b1f138338c93fa 100644
|
| --- a/media/filters/ffmpeg_audio_decoder.cc
|
| +++ b/media/filters/ffmpeg_audio_decoder.cc
|
| @@ -74,13 +74,18 @@ void FFmpegAudioDecoder::OnStop() {
|
| }
|
|
|
| void FFmpegAudioDecoder::OnDecode(Buffer* input) {
|
| + // Due to FFmpeg API changes we no longer have const read-only pointers.
|
| + AVPacket packet;
|
| + av_init_packet(&packet);
|
| + packet.data = const_cast<uint8*>(input->GetData());
|
| + packet.size = input->GetDataSize();
|
| +
|
| int16_t* output_buffer = reinterpret_cast<int16_t*>(output_buffer_.get());
|
| int output_buffer_size = kOutputBufferSize;
|
| - int result = avcodec_decode_audio2(codec_context_,
|
| + int result = avcodec_decode_audio3(codec_context_,
|
| output_buffer,
|
| &output_buffer_size,
|
| - input->GetData(),
|
| - input->GetDataSize());
|
| + &packet);
|
|
|
| // TODO(ajwong): Consider if kOutputBufferSize should just be an int instead
|
| // of a size_t.
|
|
|