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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 10540067: Switch to using avcodec_decode_audio4, avcodec_alloc_context3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tools. Created 8 years, 6 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 | « media/filters/ffmpeg_audio_decoder.cc ('k') | media/test/ffmpeg_tests/ffmpeg_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 81ddd8bee2e52e7a4fcf6c3f8d9908a381c23d88..41bd0e49f60c95da847132362fab7f2cdbd4dd24 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -96,7 +96,7 @@ void FFmpegVideoDecoder::Initialize(const scoped_refptr<DemuxerStream>& stream,
}
// Initialize AVCodecContext structure.
- codec_context_ = avcodec_alloc_context();
+ codec_context_ = avcodec_alloc_context3(NULL);
VideoDecoderConfigToAVCodecContext(config, codec_context_);
// Enable motion vector search (potentially slow), strong deblocking filter
@@ -323,6 +323,9 @@ bool FFmpegVideoDecoder::Decode(
// Let FFmpeg handle presentation timestamp reordering.
codec_context_->reordered_opaque = buffer->GetTimestamp().InMicroseconds();
+ // Reset frame to default values.
+ avcodec_get_frame_defaults(av_frame_);
+
// This is for codecs not using get_buffer to initialize
// |av_frame_->reordered_opaque|
av_frame_->reordered_opaque = codec_context_->reordered_opaque;
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.cc ('k') | media/test/ffmpeg_tests/ffmpeg_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698