Chromium Code Reviews| Index: media/filters/ffmpeg_video_decoder.cc |
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc |
| index 094720566e1eaa7cb03ff02a8784fec0c325231d..cadccc45acca5b0818ab4a4612b12a522d84aaae 100644 |
| --- a/media/filters/ffmpeg_video_decoder.cc |
| +++ b/media/filters/ffmpeg_video_decoder.cc |
| @@ -349,6 +349,12 @@ bool FFmpegVideoDecoder::FFmpegDecode( |
| packet.data = const_cast<uint8_t*>(buffer->data()); |
| packet.size = buffer->data_size(); |
| + // Starting in M60, avcodec_decode_video2() generates an error if |
| + // empty buffer provided. If that is the case signal that more data |
|
xhwang
2017/05/15 23:35:17
"If that is the case" seems to be confusing since
jrummell
2017/05/16 21:54:03
Done.
|
| + // is required to produce more frames. |
|
xhwang
2017/05/15 23:35:17
Could you please refer to crbug.com/663438 for con
jrummell
2017/05/16 21:54:03
Done.
|
| + if (!packet.size) |
| + return true; |
| + |
| // Let FFmpeg handle presentation timestamp reordering. |
| codec_context_->reordered_opaque = buffer->timestamp().InMicroseconds(); |
| } |