Index: media/video/ffmpeg_video_decode_engine.cc |
diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc |
index 041309244d2c80f90618454ccef8e951ba2019e7..34cc90242fe1a54e7da82ebae02e83f6ede6c143 100644 |
--- a/media/video/ffmpeg_video_decode_engine.cc |
+++ b/media/video/ffmpeg_video_decode_engine.cc |
@@ -303,6 +303,17 @@ void FFmpegVideoDecodeEngine::DecodeFrame(scoped_refptr<Buffer> buffer) { |
video_frame = frame_queue_available_.front(); |
frame_queue_available_.pop_front(); |
+ if ((video_frame->width() != codec_context_->width) || |
+ (video_frame->height() != codec_context_->height)) { |
+ |
Ami GONE FROM CHROMIUM
2011/05/19 20:27:37
extra newline
acolwell GONE FROM CHROMIUM
2011/05/20 01:26:37
Done.
|
+ VideoFrame::CreateFrame(VideoFrame::YV12, |
+ codec_context_->width, |
+ codec_context_->height, |
+ kNoTimestamp, |
+ kNoTimestamp, |
+ &video_frame); |
+ } |
+ |
// Copy the frame data since FFmpeg reuses internal buffers for AVFrame |
// output, meaning the data is only valid until the next |
// avcodec_decode_video() call. |