1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
commit 6f34e14b28d2f9103151c6ba08b3bb40448ffe46
Author: Alex Merry <kde@randomguy3.me.uk>
Date: Thu Aug 23 23:45:34 2012 +0100
Fix K3B to build with recent FFMPEG versions
FFMPEG 0.11 (shipped on ArchLinux, for example) has renamed some
functions.
The exact versions in the #ifdefs are taken from the Mobile Robot
Programming Toolkit.
BUG: 300731
diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
index 0c5f366..024c18c 100644
--- ./plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ ./plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -88,7 +88,11 @@ bool K3bFFMpegFile::open()
close();
// open the file
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,2,0)
+ int err = ::avformat_open_input( &d->formatContext, m_filename.toLocal8Bit(), 0, 0 );
+#else
int err = ::av_open_input_file( &d->formatContext, m_filename.toLocal8Bit(), 0, 0, 0 );
+#endif
if( err < 0 ) {
kDebug() << "(K3bFFMpegFile) unable to open " << m_filename << " with error " << err;
return false;
@@ -143,7 +147,11 @@ bool K3bFFMpegFile::open()
}
// dump some debugging info
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,2,0)
+ ::av_dump_format( d->formatContext, 0, m_filename.toLocal8Bit(), 0 );
+#else
::dump_format( d->formatContext, 0, m_filename.toLocal8Bit(), 0 );
+#endif
return true;
}
|