[vdr-plugin-osdpip] 02/03: Added libav fix from Alexander Grothe / yaVDR

Tobias Grimm tiber-guest at moszumanska.debian.org
Sat Feb 14 13:49:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-osdpip.

commit aa78aef0a60926ec66e9328c5f2c45e65fa04630
Author: etobi <git at e-tobi.net>
Date:   Sat Feb 14 14:42:37 2015 +0100

    Added libav fix from Alexander Grothe / yaVDR
---
 debian/changelog         |  1 +
 debian/patches/fix_libav | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series    |  1 +
 3 files changed, 63 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 714e2cd..4981a40 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ vdr-plugin-osdpip (0.1.2-8) experimental; urgency=medium
 
   * Standards-Version: 3.9.6
   * Build-depend on vdr-dev (>= 2.1.10)
+  * Added libav fix from Alexander Grothe / yaVDR
 
  -- Tobias Grimm <etobi at debian.org>  Sat, 14 Feb 2015 14:36:28 +0100
 
diff --git a/debian/patches/fix_libav b/debian/patches/fix_libav
new file mode 100644
index 0000000..3e4c716
--- /dev/null
+++ b/debian/patches/fix_libav
@@ -0,0 +1,61 @@
+--- a/decoder.h
++++ b/decoder.h
+@@ -34,7 +34,7 @@
+   #include <libavcodec/avcodec.h>
+   #ifdef USE_SWSCALE
+     #include <libswscale/swscale.h>
+-    #include <libavcodec/opt.h>
++    #include <libavutil/opt.h>
+   #endif
+ #else
+   #include <ffmpeg/avcodec.h>
+--- a/osdpip.c
++++ b/osdpip.c
+@@ -71,7 +71,7 @@
+ bool cPluginOsdpip::Initialize(void)
+ {
+     // must be called before using avcodec lib
+-    avcodec_init();
++    //avcodec_init();
+     // register all the codecs (you can also register only the codec
+     // you wish to have smaller code)
+     avcodec_register_all();
+--- a/decoder.c
++++ b/decoder.c
+@@ -34,8 +34,8 @@
+         printf("codec not found\n");
+         return -1;
+     }
+-    m_Context = avcodec_alloc_context();
+-    if (avcodec_open(m_Context, m_Codec) < 0)
++    m_Context = avcodec_alloc_context3(m_Codec);
++    if (avcodec_open2(m_Context, m_Codec, NULL) < 0)
+     {
+         printf("could not open codec\n");
+         return -1;
+@@ -106,17 +106,17 @@
+         return -1;
+     }
+ 
+-    av_set_int(context, "srcw", m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight));
+-    av_set_int(context, "srch", m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom));
+-    av_set_int(context, "src_format", PIX_FMT_YUV420P);
+-    av_set_int(context, "dstw", m_Width);
+-    av_set_int(context, "dsth", m_Height);
++    av_opt_set_int(context, "srcw", m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight), 0);
++    av_opt_set_int(context, "srch", m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), 0);
++    av_opt_set_int(context, "src_format", PIX_FMT_YUV420P, 0);
++    av_opt_set_int(context, "dstw", m_Width, 0);
++    av_opt_set_int(context, "dsth", m_Height, 0);
+ #ifdef USE_NEW_FFMPEG_HEADERS
+-    av_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P);
++    av_opt_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, 0);
+ #else
+-    av_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P);
++    av_opt_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, 0);
+ #endif
+-    av_set_int(context, "sws_flags", SWS_LANCZOS);
++    av_opt_set_int(context, "sws_flags", SWS_LANCZOS, 0);
+ 
+     if (sws_init_context(context, NULL, NULL) < 0) {
+         printf("Error initializing conversion context.\n");
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..afc8403
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_libav

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-osdpip.git



More information about the pkg-vdr-dvb-changes mailing list