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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 2801803002: Android: enable H264&VP8 HW accelerator for MediaRecorder (Closed)
Patch Set: revision according to the fact that min resolution requirement varies Created 3 years, 8 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
« no previous file with comments | « content/test/data/media/mediarecorder_test.html ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 950b9c0fd103672103d65048a7ad47ab48b89ee7..a241e0491bffc8f5b8ee35073dca92e858d55916 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -506,10 +506,13 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream,
coded_size.set_height((coded_size.height() + 1) / 2 * 2);
}
- AVDictionaryEntry* webm_alpha =
- av_dict_get(stream->metadata, "alpha_mode", nullptr, 0);
- if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
- format = PIXEL_FORMAT_YV12A;
+ // H264 doesn't support alpha mode.
+ if (codec != kCodecH264) {
+ AVDictionaryEntry* webm_alpha =
+ av_dict_get(stream->metadata, "alpha_mode", nullptr, 0);
+ if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
+ format = PIXEL_FORMAT_YV12A;
+ }
}
// Prefer the color space found by libavcodec if available.
« no previous file with comments | « content/test/data/media/mediarecorder_test.html ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698