Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: media/video/ffmpeg_video_decode_engine.cc

Issue 7044008: Initial implementation of stream switching in AdaptiveDemuxer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« media/filters/video_renderer_base.cc ('K') | « media/filters/video_renderer_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698