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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 399107: Merge 32455 - Check for null frame pointers and do nothing to avoid a crash.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/195/src/
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.cc
===================================================================
--- media/filters/ffmpeg_video_decoder.cc (revision 32473)
+++ media/filters/ffmpeg_video_decoder.cc (working copy)
@@ -195,6 +195,15 @@
bool FFmpegVideoDecoder::EnqueueVideoFrame(VideoSurface::Format surface_format,
const TimeTuple& time,
const AVFrame* frame) {
+ // TODO(fbarchard): Work around for FFmpeg http://crbug.com/27675
+ // The decoder is in a bad state and not decoding correctly.
+ // Checking for NULL avoids a crash in CopyPlane().
+ if (!frame->data[VideoSurface::kYPlane] ||
+ !frame->data[VideoSurface::kUPlane] ||
+ !frame->data[VideoSurface::kVPlane]) {
+ return true;
+ }
+
scoped_refptr<VideoFrame> video_frame;
VideoFrameImpl::CreateFrame(surface_format, width_, height_,
time.timestamp, time.duration, &video_frame);
Property changes on: media\filters\ffmpeg_video_decoder.cc
___________________________________________________________________
Deleted: svn:mergeinfo
Reverse-merged /trunk/src/media/filters/ffmpeg_video_decoder.cc:r21611,23937,25416
Reverse-merged /branches/chrome_webkit_merge_branch/media/filters/ffmpeg_video_decoder.cc:r69-2775
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698