summaryrefslogtreecommitdiff
path: root/extra/k3b/k3b-2.0.2-libav9.patch
blob: bb1f5e1a44d8bede7db816e70f9aabcd52a8d6e0 (plain)
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
Index: k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
===================================================================
--- k3b-2.0.2.orig/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp	2013-04-22 17:46:13.523959500 +0200
+++ k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp	2013-04-22 18:40:49.890007513 +0200
@@ -95,7 +95,7 @@ bool K3bFFMpegFile::open()
     }
 
     // analyze the streams
-    ::av_find_stream_info( d->formatContext );
+    ::avformat_find_stream_info( d->formatContext, 0 );
 
     // we only handle files containing one audio stream
     if( d->formatContext->nb_streams != 1 ) {
@@ -129,7 +129,7 @@ bool K3bFFMpegFile::open()
 
     // open the codec on our context
     kDebug() << "(K3bFFMpegFile) found codec for " << m_filename;
-    if( ::avcodec_open( codecContext, d->codec ) < 0 ) {
+    if( ::avcodec_open2( codecContext, d->codec, 0 ) < 0 ) {
         kDebug() << "(K3bFFMpegDecoderFactory) could not open codec.";
         return false;
     }
--- k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.orig	2013-07-12 23:05:37.371157123 -0400
+++ k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp	2013-07-12 23:12:01.649948739 -0400
@@ -55,7 +55,7 @@
     K3b::Msf length;
 
     // for decoding. ffmpeg requires 16-byte alignment.
-    char outputBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE + 15];
+    char outputBuffer[192000 + 15];
     char* alignedOutputBuffer;
     char* outputBufferPos;
     int outputBufferSize;
@@ -319,7 +319,7 @@
         }
 
         d->outputBufferPos = d->alignedOutputBuffer;
-        d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+        d->outputBufferSize = 192000;
 
 #if LIBAVCODEC_VERSION_MAJOR < 52
         int len = ::avcodec_decode_audio(