| Index: media/filters/ffmpeg_demuxer.cc
|
| diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
|
| index 45e5298fa32375bbc7bc7adca19bfc7265e2c537..f428c45844aec5437d9d5e36e7b315a7c4f7424a 100644
|
| --- a/media/filters/ffmpeg_demuxer.cc
|
| +++ b/media/filters/ffmpeg_demuxer.cc
|
| @@ -73,6 +73,10 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(FFmpegDemuxer* demuxer,
|
| break;
|
| case AVMEDIA_TYPE_VIDEO:
|
| type_ = VIDEO;
|
| + AVCodecContextToVideoDecoderConfig(stream->codec,
|
| + stream->r_frame_rate,
|
| + GetAspectRatio(stream),
|
| + &video_config_);
|
| break;
|
| default:
|
| NOTREACHED();
|
| @@ -254,15 +258,16 @@ void FFmpegDemuxerStream::EnableBitstreamConverter() {
|
| }
|
| }
|
|
|
| -AVStream* FFmpegDemuxerStream::GetAVStream() {
|
| - return stream_;
|
| -}
|
| -
|
| const AudioDecoderConfig& FFmpegDemuxerStream::audio_decoder_config() {
|
| CHECK_EQ(type_, AUDIO);
|
| return audio_config_;
|
| }
|
|
|
| +const VideoDecoderConfig& FFmpegDemuxerStream::video_decoder_config() {
|
| + CHECK_EQ(type_, VIDEO);
|
| + return video_config_;
|
| +}
|
| +
|
| // static
|
| base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
|
| const AVRational& time_base, int64 timestamp) {
|
| @@ -684,8 +689,7 @@ void FFmpegDemuxer::DisableAudioStreamTask() {
|
| // If the codec type is audio, remove the reference. DemuxTask() will
|
| // look for such reference, and this will result in deleting the
|
| // audio packets after they are demuxed.
|
| - if (packet_streams_[i]->GetAVStream()->codec->codec_type ==
|
| - AVMEDIA_TYPE_AUDIO) {
|
| + if (packet_streams_[i]->type() == DemuxerStream::AUDIO) {
|
| packet_streams_[i] = NULL;
|
| }
|
| }
|
|
|