[med-svn] r16298 - in trunk/packages/amide/trunk/debian: . patches

Andreas Tille tille at moszumanska.debian.org
Mon Feb 24 14:27:52 UTC 2014


Author: tille
Date: 2014-02-24 14:27:52 +0000 (Mon, 24 Feb 2014)
New Revision: 16298

Added:
   trunk/packages/amide/trunk/debian/patches/libav10.patch
Modified:
   trunk/packages/amide/trunk/debian/changelog
   trunk/packages/amide/trunk/debian/patches/series
Log:
Fix compilation against libav 10


Modified: trunk/packages/amide/trunk/debian/changelog
===================================================================
--- trunk/packages/amide/trunk/debian/changelog	2014-02-23 07:06:02 UTC (rev 16297)
+++ trunk/packages/amide/trunk/debian/changelog	2014-02-24 14:27:52 UTC (rev 16298)
@@ -1,8 +1,11 @@
 amide (1.0.4-2) UNRELEASED; urgency=low
 
-  * debian/upstream: Add publication data
+  * debian/upstream/metadata: Add publication data
+  * debian/patches/libav10.patch: Fix compilation against libav 10
+    (Thanks to Reinhard Tartler <siretart at tauware.de> for the patch)
+    Closes: #739211
 
- -- Andreas Tille <tille at debian.org>  Tue, 26 Nov 2013 15:46:03 +0100
+ -- Andreas Tille <tille at debian.org>  Mon, 24 Feb 2014 15:30:19 +0100
 
 amide (1.0.4-1) unstable; urgency=low
 

Added: trunk/packages/amide/trunk/debian/patches/libav10.patch
===================================================================
--- trunk/packages/amide/trunk/debian/patches/libav10.patch	                        (rev 0)
+++ trunk/packages/amide/trunk/debian/patches/libav10.patch	2014-02-24 14:27:52 UTC (rev 16298)
@@ -0,0 +1,61 @@
+Description: Fix compilation against libav 10
+Author: Reinhard Tartler <siretart at tauware.de>
+Bug-Debian: http://bugs.debian.org/739211
+
+--- a/src/mpeg_encode.c
++++ b/src/mpeg_encode.c
+@@ -142,6 +142,7 @@ static void convert_rgb_pixbuf_to_yuv(yu
+ #ifdef AMIDE_FFMPEG_SUPPORT
+ 
+ #include <libavcodec/avcodec.h>
++#include <libavutil/frame.h>
+ 
+ 
+ typedef struct {
+@@ -234,11 +235,11 @@ gpointer mpeg_encode_setup(gchar * outpu
+ 
+   switch(type) {
+   case ENCODE_MPEG4:
+-    codec_type = CODEC_ID_MPEG4;
++    codec_type = AV_CODEC_ID_MPEG4;
+     break;
+   case ENCODE_MPEG1:
+   default:
+-    codec_type=CODEC_ID_MPEG1VIDEO;
++    codec_type=AV_CODEC_ID_MPEG1VIDEO;
+     break;
+   }
+ 
+@@ -268,7 +269,7 @@ gpointer mpeg_encode_setup(gchar * outpu
+     return NULL;
+   }
+ 
+-  encode->picture= avcodec_alloc_frame();
++  encode->picture= av_frame_alloc();
+   if (!encode->picture) {
+     g_warning("couldn't allocate memory for encode->picture");
+     encode_free(encode);
+@@ -359,15 +360,19 @@ gpointer mpeg_encode_setup(gchar * outpu
+ 
+ gboolean mpeg_encode_frame(gpointer data, GdkPixbuf * pixbuf) {
+   encode_t * encode = data;
+-  gint out_size;
++  AVPacket pkt = { 0 };
++  int ret, got_packet = 0;
+ 
+   convert_rgb_pixbuf_to_yuv(encode->yuv, pixbuf);
+ 
+   /* encode the image */
+-  out_size = avcodec_encode_video(encode->context, encode->output_buffer, encode->output_buffer_size, encode->picture);
+-  fwrite(encode->output_buffer, 1, out_size, encode->output_file);
++  ret = avcodec_encode_video2(encode->context, &pkt, encode->picture, &got_packet);
+ 
+-  return TRUE;
++  if (ret >= 0 && got_packet) {
++      fwrite(pkt.data, 1, pkt.size, encode->output_file);
++      av_free_packet(&pkt);
++  }
++  return (ret >= 0) ? TRUE : FALSE;
+ };
+ 
+ /* close everything up */

Modified: trunk/packages/amide/trunk/debian/patches/series
===================================================================
--- trunk/packages/amide/trunk/debian/patches/series	2014-02-23 07:06:02 UTC (rev 16297)
+++ trunk/packages/amide/trunk/debian/patches/series	2014-02-24 14:27:52 UTC (rev 16298)
@@ -1,3 +1,4 @@
 10_all.patch
 gcc-4.8_format-security.patch
 deprecated-libav.patch
+libav10.patch




More information about the debian-med-commit mailing list