| Index: media/ffmpeg/ffmpeg_common.cc
|
| diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
|
| index 42642fbfbecd917c185699e0cc4c95066974b0cf..5e7f706c59a9068ddd476a717e05e6960f8426cc 100644
|
| --- a/media/ffmpeg/ffmpeg_common.cc
|
| +++ b/media/ffmpeg/ffmpeg_common.cc
|
| @@ -411,6 +411,16 @@ void AVStreamToVideoDecoderConfig(
|
| if (key)
|
| is_encrypted = true;
|
|
|
| + AVDictionaryEntry* rotation_entry =
|
| + av_dict_get(stream->metadata, "rotate", NULL, 0);
|
| + int rotation = 0;
|
| + if (rotation_entry && rotation_entry->value && rotation_entry->value[0])
|
| + base::StringToInt(rotation_entry->value, &rotation);
|
| +
|
| + DCHECK(rotation == 0 || rotation == 90 || rotation == 180 || rotation == 270);
|
| + if (rotation != 90 && rotation != 180 && rotation != 270)
|
| + rotation = 0;
|
| +
|
| AVDictionaryEntry* webm_alpha =
|
| av_dict_get(stream->metadata, "alpha_mode", NULL, 0);
|
| if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
|
| @@ -424,6 +434,8 @@ void AVStreamToVideoDecoderConfig(
|
| stream->codec->extradata, stream->codec->extradata_size,
|
| is_encrypted,
|
| record_stats);
|
| +
|
| + config->set_rotation(rotation);
|
| }
|
|
|
| void VideoDecoderConfigToAVCodecContext(
|
|
|