diff options
author | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 00:59:14 +0000 |
---|---|---|
committer | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 00:59:14 +0000 |
commit | 492ee7bbe69032c872ae5965e0850efdf91083ed (patch) | |
tree | 94d908489f8bf2659c468fed72b3db9c945b6747 /media | |
parent | a1800e8c451736dea5663ae461454ab663d05bc4 (diff) | |
download | chromium_src-492ee7bbe69032c872ae5965e0850efdf91083ed.zip chromium_src-492ee7bbe69032c872ae5965e0850efdf91083ed.tar.gz chromium_src-492ee7bbe69032c872ae5965e0850efdf91083ed.tar.bz2 |
Check for null frame pointers and do nothing to avoid a crash.
BUG=27675
TEST=play this http://fbarchard-kir.ad.corp.google.com/mediatests/runthrough.mp4 and do lots of seeks. A crash will occur after about 5 or 10 seeks without this patch.
Review URL: http://codereview.chromium.org/401021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/ffmpeg_video_decoder.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc index bd3ed981..b2cb78c 100644 --- a/media/filters/ffmpeg_video_decoder.cc +++ b/media/filters/ffmpeg_video_decoder.cc @@ -195,6 +195,15 @@ void FFmpegVideoDecoder::OnDecode(Buffer* buffer) { 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); |