]>
Commit | Line | Data |
---|---|---|
93381a8e JB |
1 | --- chromaprint-0.7/src/ext/ffmpeg_decoder.h.orig 2012-09-05 20:05:36.000000000 +0200 |
2 | +++ chromaprint-0.7/src/ext/ffmpeg_decoder.h 2012-10-10 17:59:58.632685943 +0200 | |
3 | @@ -80,7 +80,7 @@ | |
4 | avcodec_close(m_codec_ctx); | |
5 | } | |
6 | if (m_format_ctx) { | |
7 | - av_close_input_file(m_format_ctx); | |
8 | + avformat_close_input(&m_format_ctx); | |
9 | } | |
10 | //av_audio_convert_free(m_convert_ctx); | |
11 | av_free(m_buffer2); | |
12 | @@ -89,12 +89,12 @@ | |
13 | ||
14 | inline bool Decoder::Open() | |
15 | { | |
16 | - if (av_open_input_file(&m_format_ctx, m_file_name.c_str(), NULL, 0, NULL) != 0) { | |
17 | + if (avformat_open_input(&m_format_ctx, m_file_name.c_str(), NULL, NULL) != 0) { | |
18 | m_error = "Couldn't open the file." + m_file_name; | |
19 | return false; | |
20 | } | |
21 | ||
22 | - if (av_find_stream_info(m_format_ctx) < 0) { | |
23 | + if (avformat_find_stream_info(m_format_ctx, NULL) < 0) { | |
24 | m_error = "Couldn't find stream information in the file."; | |
25 | return false; | |
26 | } | |
27 | @@ -129,11 +129,11 @@ | |
28 | return false; | |
29 | } | |
30 | ||
31 | - if (m_codec_ctx->sample_fmt != SAMPLE_FMT_S16) { | |
32 | + if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) { | |
33 | m_error = "Unsupported sample format.\n"; | |
34 | return false; | |
35 | } | |
36 | - /*m_convert_ctx = av_audio_convert_alloc(SAMPLE_FMT_S16, 1, | |
37 | + /*m_convert_ctx = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1, | |
38 | m_codec_ctx->sample_fmt, 1, | |
39 | NULL, 0); | |
40 | if (!m_convert_ctx) { |