| Index: media/filters/ffmpeg_video_decoder.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
| index d5402279f7548d75c54ba2f5516dd704e8b4ff65..998eea9bf4bc97b55084ed751ed22b9d671e048a 100644
|
| --- a/media/filters/ffmpeg_video_decoder.cc
|
| +++ b/media/filters/ffmpeg_video_decoder.cc
|
| @@ -58,22 +58,11 @@ void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
|
| initialize_callback_ = callback;
|
| statistics_callback_ = stats_callback;
|
|
|
| - AVStream* av_stream = demuxer_stream->GetAVStream();
|
| - if (!av_stream) {
|
| - OnInitializeComplete(false);
|
| - return;
|
| - }
|
| + const VideoDecoderConfig& config = demuxer_stream->video_decoder_config();
|
|
|
| - pts_stream_.Initialize(GetFrameDuration(av_stream));
|
| + pts_stream_.Initialize(GetFrameDuration(config));
|
|
|
| - gfx::Size coded_size(
|
| - av_stream->codec->coded_width, av_stream->codec->coded_height);
|
| - // TODO(vrk): This assumes decoded frame data starts at (0, 0), which is true
|
| - // for now, but may not always be true forever. Fix this in the future.
|
| - gfx::Rect visible_rect(
|
| - av_stream->codec->width, av_stream->codec->height);
|
| -
|
| - natural_size_ = GetNaturalSize(av_stream);
|
| + natural_size_ = config.natural_size();
|
| if (natural_size_.width() > Limits::kMaxDimension ||
|
| natural_size_.height() > Limits::kMaxDimension ||
|
| natural_size_.GetArea() > Limits::kMaxCanvas) {
|
| @@ -81,14 +70,6 @@ void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
|
| return;
|
| }
|
|
|
| - VideoDecoderConfig config(CodecIDToVideoCodec(av_stream->codec->codec_id),
|
| - PixelFormatToVideoFormat(av_stream->codec->pix_fmt),
|
| - coded_size, visible_rect,
|
| - av_stream->r_frame_rate.num,
|
| - av_stream->r_frame_rate.den,
|
| - av_stream->codec->extradata,
|
| - av_stream->codec->extradata_size);
|
| -
|
| state_ = kInitializing;
|
| decode_engine_->Initialize(message_loop_, this, NULL, config);
|
| }
|
|
|