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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 1230793009: Initial support for the desktop media pipeline on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index cb806c74812aba84ee66885a36f746f161ad0129..13c1f5f26f2f84d3262480846be7fa25c9b9f2d6 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -407,11 +407,12 @@ void AVStreamToVideoDecoderConfig(
}
VideoFrame::Format format = PixelFormatToVideoFormat(stream->codec->pix_fmt);
- if (codec == kCodecVP9) {
- // TODO(tomfinegan): libavcodec doesn't know about VP9.
liberato (no reviews please) 2015/07/10 17:15:09 maybe keep the TODO.
+ // The format and coded size may be unknown by FFmpeg for VP9, and on Android
+ // where FFmpeg is compiled without parsers.
+ if (format == VideoFrame::UNKNOWN)
liberato (no reviews please) 2015/07/10 17:15:09 setting any unknown format to YV12 seems like it c
watk 2015/07/10 18:51:26 AFAIK this is ok, but I'm not sure enough, so I'll
format = VideoFrame::YV12;
+ if (coded_size == gfx::Size(0, 0))
liberato (no reviews please) 2015/07/10 17:15:09 also seems scary to do for any unknown size.
watk 2015/07/10 18:51:25 Done.
coded_size = visible_rect.size();
- }
// Pad out |coded_size| for subsampled YUV formats.
if (format != VideoFrame::YV24) {

Powered by Google App Engine
This is Rietveld 408576698