summaryrefslogtreecommitdiff
path: root/media-plugins/vdr-image/files/vdr-image-0.3.1-ffmpeg-1.patch
blob: 78fd1d384435596e0b17f6ca21101f70e7fd5bdc (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
diff -urN image-0.3.1.old/liboutput/encode.c image-0.3.1/liboutput/encode.c
--- image-0.3.1.old/liboutput/encode.c	2013-06-17 21:23:23.308430203 +0200
+++ image-0.3.1/liboutput/encode.c	2013-06-17 21:27:37.126421173 +0200
@@ -49,7 +49,6 @@
 
 bool cEncode::Register()
 {
-    avcodec_init();
 #if 0 
     // XXX to resolv: dosen't work with osdpip
     register_avcodec(&mpeg2video_encoder);
@@ -100,7 +99,7 @@
     AVCodecContext  *pAVCC = NULL;
     AVFrame         *pAVF = NULL;
 
-    pAVCC = avcodec_alloc_context();
+    pAVCC = avcodec_alloc_context3(NULL);
     if (! pAVCC) 
     {
         esyslog("imageplugin: Failed to alloc memory for AVCodecContext.");
@@ -116,7 +115,7 @@
         {
             SetupEncodingParameters(pAVCC);
 
-            if (avcodec_open(pAVCC, m_pavCodec) < 0) 
+            if (avcodec_open2(pAVCC, m_pavCodec, NULL) < 0) 
             {
                 esyslog("imageplugin: Couldn't open Codec.");
             }
diff -urN image-0.3.1.old/liboutput/encode.h image-0.3.1/liboutput/encode.h
--- image-0.3.1.old/liboutput/encode.h	2013-06-17 21:23:23.308430203 +0200
+++ image-0.3.1/liboutput/encode.h	2013-06-17 21:27:37.127421173 +0200
@@ -14,6 +14,7 @@
 
 extern "C" {
 #include <libavcodec/avcodec.h>
+#include <libavutil/mem.h>
 }
 
 #include "../setup-image.h"