~ubuntu-branches/ubuntu/trusty/k3b/trusty

« back to all changes in this revision

Viewing changes to debian/patches/ffmpeg-more.diff

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-11-12 10:36:01 UTC
  • mfrom: (2.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20131112103601-q6vvln9lv3mg7qxh
Tags: 2.0.2-7ubuntu1
* Merge with Debian, remaining changes:
  - Suggest, not recommend libk3b6-extracodecs (Cannot be on the CD)
  - Do not ship k3b documentation, it's for the KDE3 version.
  - Do not install unused scalable icons to save space
  - Keep kubuntu_02_kubuntu_restricted.diff
  - Keep kubuntu_03_no_missing_mp3_warn.diff
  - Keep kubuntu_05_no_system_settings.diff
  - Keep kubuntu_07_quicklists.diff
  - Disable 111_advice_debian_libk3b3-extracodes.diff and
    112_dont_require_mp3.diff which aren't required due to our mp3 patches.
  - swap kubuntu_06_libav_0.7.diff for Debian's
    Fixed_compilation_with_new_FFMPEG.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
 
2
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
 
3
@@ -99,7 +99,11 @@
 
4
     }
 
5
 
 
6
     // analyze the streams
 
7
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,3,0)
 
8
+    ::avformat_find_stream_info( d->formatContext, 0 );
 
9
+#else
 
10
     ::av_find_stream_info( d->formatContext );
 
11
+#endif
 
12
 
 
13
     // we only handle files containing one audio stream
 
14
     if( d->formatContext->nb_streams != 1 ) {
 
15
@@ -133,7 +137,12 @@
 
16
 
 
17
     // open the codec on our context
 
18
     kDebug() << "(K3bFFMpegFile) found codec for " << m_filename;
 
19
-    if( ::avcodec_open( codecContext, d->codec ) < 0 ) {
 
20
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,6,0)
 
21
+    err = ::avcodec_open2( codecContext, d->codec, 0 );
 
22
+#else
 
23
+    err = ::avcodec_open( codecContext, d->codec );
 
24
+#endif
 
25
+    if( err < 0 ) {
 
26
         kDebug() << "(K3bFFMpegDecoderFactory) could not open codec.";
 
27
         return false;
 
28
     }