summaryrefslogtreecommitdiffstats
path: root/media/test
diff options
context:
space:
mode:
authordalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-01 22:32:14 +0000
committerdalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-01 22:32:14 +0000
commit859b463585079cc5c4f5b6ae97602988538aeeec (patch)
tree2d03dc61a3f77a4aa5a6b5f212c3e8691527dbd9 /media/test
parent3e1c8fedc6c736caf16ad356d6e99768da49f47c (diff)
downloadchromium_src-859b463585079cc5c4f5b6ae97602988538aeeec.zip
chromium_src-859b463585079cc5c4f5b6ae97602988538aeeec.tar.gz
chromium_src-859b463585079cc5c4f5b6ae97602988538aeeec.tar.bz2
Second attempt to land ffmpeg roll.
Attempt 2 at landing http://codereview.chromium.org/9317096/ Same as before except for fixes in checkperms/ However, fixes have landed elsewhere for: - mp3 decode issue. - FrameRateNoVsyncCanvasInternalTest.fishbowl/0 BUG=110776 TEST=unittests, layouttests, trybots, perf tests... Review URL: https://chromiumcodereview.appspot.com/9447029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/test')
-rw-r--r--media/test/ffmpeg_tests/ffmpeg_tests.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/media/test/ffmpeg_tests/ffmpeg_tests.cc b/media/test/ffmpeg_tests/ffmpeg_tests.cc
index 90cf45e..73b69f4 100644
--- a/media/test/ffmpeg_tests/ffmpeg_tests.cc
+++ b/media/test/ffmpeg_tests/ffmpeg_tests.cc
@@ -114,12 +114,11 @@ int main(int argc, const char** argv) {
#endif
// Register FFmpeg and attempt to open file.
- avcodec_init();
av_log_set_level(verbose_level);
av_register_all();
av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol));
AVFormatContext* format_context = NULL;
- // av_open_input_file wants a char*, which can't work with wide paths.
+ // avformat_open_input() wants a char*, which can't work with wide paths.
// So we assume ASCII on Windows. On other platforms we can pass the
// path bytes through verbatim.
#if defined(OS_WIN)
@@ -127,8 +126,8 @@ int main(int argc, const char** argv) {
#else
const std::string& string_path = in_path.value();
#endif
- int result = av_open_input_file(&format_context, string_path.c_str(),
- NULL, 0, NULL);
+ int result = avformat_open_input(&format_context, string_path.c_str(),
+ NULL, NULL);
if (result < 0) {
switch (result) {
case AVERROR(EINVAL):
@@ -155,7 +154,7 @@ int main(int argc, const char** argv) {
}
// Parse a little bit of the stream to fill out the format context.
- if (av_find_stream_info(format_context) < 0) {
+ if (avformat_find_stream_info(format_context, NULL) < 0) {
std::cerr << "Error: Could not find stream info for "
<< in_path.value() << std::endl;
return 1;
@@ -230,7 +229,7 @@ int main(int argc, const char** argv) {
}
codec_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
- codec_context->error_recognition = FF_ER_CAREFUL;
+ codec_context->err_recognition = AV_EF_CAREFUL;
// Initialize threaded decode.
if (target_codec == AVMEDIA_TYPE_VIDEO && video_threads > 0) {
@@ -238,7 +237,7 @@ int main(int argc, const char** argv) {
}
// Initialize our codec.
- if (avcodec_open(codec_context, codec) < 0) {
+ if (avcodec_open2(codec_context, codec, NULL) < 0) {
std::cerr << "Error: Could not open codec "
<< codec_context->codec->name << " for "
<< in_path.value() << std::endl;
@@ -421,7 +420,7 @@ int main(int argc, const char** argv) {
if (codec_context)
avcodec_close(codec_context);
if (format_context)
- av_close_input_file(format_context);
+ avformat_close_input(&format_context);
// Calculate the sum of times. Note that some of these may be zero.
double sum = 0;