Index: media/filters/ffmpeg_audio_decoder.cc |
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc |
index 941bd43b70ec50fe0b515c5098d450734855ba6d..941f79c35af47687f4496548b8db2ad8ec721e9b 100644 |
--- a/media/filters/ffmpeg_audio_decoder.cc |
+++ b/media/filters/ffmpeg_audio_decoder.cc |
@@ -351,8 +351,13 @@ void FFmpegAudioDecoder::RunDecodeLoop( |
bool skip_eos_append) { |
AVPacket packet; |
av_init_packet(&packet); |
- packet.data = const_cast<uint8*>(input->GetData()); |
- packet.size = input->GetDataSize(); |
+ if (input->IsEndOfStream()) { |
+ packet.data = NULL; |
+ packet.size = 0; |
+ } else { |
+ packet.data = const_cast<uint8*>(input->GetData()); |
+ packet.size = input->GetDataSize(); |
+ } |
// Each audio packet may contain several frames, so we must call the decoder |
// until we've exhausted the packet. Regardless of the packet size we always |