diff options
author | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 20:10:44 +0000 |
---|---|---|
committer | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 20:10:44 +0000 |
commit | 7d2dff290cee0b1537f9454ca688087539911e4a (patch) | |
tree | d85654746ecb9d630fdb65dd2dafa56f673ebef1 /media/ffmpeg/ffmpeg_common.cc | |
parent | 92d213847a203e5135aa1d746e97ff11925f77cc (diff) | |
download | chromium_src-7d2dff290cee0b1537f9454ca688087539911e4a.zip chromium_src-7d2dff290cee0b1537f9454ca688087539911e4a.tar.gz chromium_src-7d2dff290cee0b1537f9454ca688087539911e4a.tar.bz2 |
Fix crash on unsupported pixel formats.
Replaces the NOTREACHED() calls with DLOG(WARNING), avoids creating
frames when invalid pixel formats are detected, and finally calls
OnInitializeComplete(false) in FFmpegVideoDecodeEngine::Initialize.
BUG=101803
TEST=Ran unittests. Ran test video.
Review URL: http://codereview.chromium.org/8437021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg/ffmpeg_common.cc')
-rw-r--r-- | media/ffmpeg/ffmpeg_common.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index cbcb7c6..396ee03 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -289,9 +289,9 @@ VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) { case PIX_FMT_YUV420P: return VideoFrame::YV12; default: - NOTREACHED() << "Unsupported PixelFormat: " << pixel_format; + DLOG(WARNING) << "Unsupported PixelFormat: " << pixel_format; + return VideoFrame::INVALID; } - return VideoFrame::INVALID; } PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) { @@ -301,9 +301,9 @@ PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) { case VideoFrame::YV12: return PIX_FMT_YUV420P; default: - NOTREACHED() << "Unsupported VideoFrame Format: " << video_format; + DLOG(WARNING) << "Unsupported VideoFrame Format: " << video_format; + return PIX_FMT_NONE; } - return PIX_FMT_NONE; } base::TimeDelta GetFrameDuration(const VideoDecoderConfig& config) { |