summaryrefslogtreecommitdiffstats
path: root/media/webm
diff options
context:
space:
mode:
authordalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-22 23:06:45 +0000
committerdalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-22 23:06:45 +0000
commit7a032766439f88961cf02aa8b06e31c865c30692 (patch)
treea8aba2889c7644e184728b287ceb95eb165e0250 /media/webm
parentdc6ea7623f8289de35907a940e1e980b65f16aae (diff)
downloadchromium_src-7a032766439f88961cf02aa8b06e31c865c30692.zip
chromium_src-7a032766439f88961cf02aa8b06e31c865c30692.tar.gz
chromium_src-7a032766439f88961cf02aa8b06e31c865c30692.tar.bz2
Fix media code to work with new ffmpeg.
Once ffmpeg git, svn are updated to new ffmpeg, will update DEPS in this CL. Which when committed, should seal the deal for the ffmpeg roll. API Changes: avutil: SampleFormat->AVSampleFormat avutil: av_get_bits_per_sample_fmt -> av_get_bytes_per_sample avcodec: avcodec_open -> avcodec_open2(..., NULL) avcodec: avcodec_decode_video2(... AVPacket ...) -> const AVPacket. avformat: av_open_input_file -> avformat_open_input avformat: av_register_protocol2 -> ffurl_register_protocol avformat: av_close_input_file -> avformat_close_input(&...) avformat: av_find_stream_info -> avformat_find_stream_info(..., NULL) URLContext now has a url_open2 method as well, for now I've set this to NULL. Also fixes: - ffmpeg_unittests change threading to mirror ffmpeg_video_decoder. There's an issue where threading causes the last frames of a no-audio video to be clipped. It existed before this ffmpeg roll, but because threading was disabled by default in ffmpeg, we never noticed it. - ffmpeg_demuxer_tests: GetBitrate_UnsetInContainer_NoFileSize now passes. - New ffmpeg_unittests passes: sync0_ogv/FFmpegTest.Seek_Video/0, where GetParam() = "sync0.ogv" sync1_ogv/FFmpegTest.Seek_Video/0, where GetParam() = "sync1.ogv" sync2_ogv/FFmpegTest.Seek_Video/0, where GetParam() = "sync2.ogv" FFmpeg fixups here, https://chromiumcodereview.appspot.com/9325049/ New git repo here: http://git.chromium.org/gitweb/?p=chromium/third_party/ffmpeg.git;a=summary Merge+Patches diff: https://chromiumcodereview.appspot.com/9317107 BUG=110776 TEST=unittests, layouttests, etc. Trybots. Review URL: https://chromiumcodereview.appspot.com/9317096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/webm')
-rw-r--r--media/webm/webm_stream_parser.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/webm/webm_stream_parser.cc b/media/webm/webm_stream_parser.cc
index f1d6001..d49ed7c 100644
--- a/media/webm/webm_stream_parser.cc
+++ b/media/webm/webm_stream_parser.cc
@@ -46,7 +46,7 @@ class FFmpegConfigHelper {
scoped_ptr<FFmpegURLProtocol> url_protocol_;
// FFmpeg format context for this demuxer. It is created by
- // av_open_input_file() during demuxer initialization and cleaned up with
+ // avformat_open_input() during demuxer initialization and cleaned up with
// DestroyAVFormatContext() in the destructor.
AVFormatContext* format_context_;
@@ -139,7 +139,7 @@ AVFormatContext* FFmpegConfigHelper::CreateFormatContext(const uint8* data,
// Open FFmpeg AVFormatContext.
AVFormatContext* context = NULL;
- int result = av_open_input_file(&context, key.c_str(), NULL, 0, NULL);
+ int result = avformat_open_input(&context, key.c_str(), NULL, NULL);
if (result < 0)
return NULL;
@@ -148,7 +148,7 @@ AVFormatContext* FFmpegConfigHelper::CreateFormatContext(const uint8* data,
}
bool FFmpegConfigHelper::SetupStreamConfigs() {
- int result = av_find_stream_info(format_context_);
+ int result = avformat_find_stream_info(format_context_, NULL);
if (result < 0)
return false;