Package: imageshack-uploader
Version: 2.2+hg20100408.d802dea89428-2
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch

Hi,

Next version of Ubuntu (Oneiric) will have libav 0.7, like experimental, and
imageshack-uploader FTBFS with this version.

Here is the patch that fix this FTBFS:
*** /tmp/tmppfQJSV

As the resulting package should builds fine in sid, thanks for considering the
patch. If you're not able to apply right now, I'll upload it temporarly in
Ubuntu and sync the package later on.

Thaks,
Fabrice
-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-8-generic (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF8, LC_CTYPE=es_ES.UTF8 (charmap=UTF-8) (ignored: LC_ALL 
set to es_ES.UTF8)
Shell: /bin/sh linked to /bin/dash
diff -Nru imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/fix-FTBFS-libav-0.7.patch imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/fix-FTBFS-libav-0.7.patch
--- imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/fix-FTBFS-libav-0.7.patch	1970-01-01 01:00:00.000000000 +0100
+++ imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/fix-FTBFS-libav-0.7.patch	2011-07-14 22:02:33.000000000 +0200
@@ -0,0 +1,40 @@
+Description: fix FTBFS with libav 0.7 because deprecated values and functions
+ has been dropped
+Author: Fabrice Coutadeur <fabric...@ubuntu.com>
+
+--- imageshack-uploader-2.2+hg20100408.d802dea89428.orig/ffmpeg_fas.c
++++ imageshack-uploader-2.2+hg20100408.d802dea89428/ffmpeg_fas.c
+@@ -392,8 +392,13 @@ fas_error_type fas_step_forward (fas_con
+ 		context->keyframe_packet_dts = context->previous_dts;
+ 	    }
+ 	  
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,23,0)
++          avcodec_decode_video2( context->codec_context, context->frame_buffer,
++                                        &frameFinished, &packet );
++#else
+ 	  avcodec_decode_video(context->codec_context, context->frame_buffer, &frameFinished,
+ 			       packet.data, packet.size);	
++#endif
+ 	  
+ 	  if (frameFinished)
+ 	    {
+--- imageshack-uploader-2.2+hg20100408.d802dea89428.orig/ffmpeg_fas.c
++++ imageshack-uploader-2.2+hg20100408.d802dea89428/ffmpeg_fas.c
+@@ -228,7 +228,7 @@ fas_error_type fas_open_video (fas_conte
+   int stream_idx;
+   for (stream_idx = 0; stream_idx < fas_context->format_context->nb_streams; stream_idx++) 
+     {
+-      if (fas_context->format_context->streams[stream_idx]->codec->codec_type == CODEC_TYPE_VIDEO)
++      if (fas_context->format_context->streams[stream_idx]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ 	{
+ 	  fas_context->stream_idx = stream_idx;
+ 	  fas_context->codec_context  = fas_context->format_context->streams[stream_idx]->codec;
+@@ -382,7 +382,7 @@ fas_error_type fas_step_forward (fas_con
+ 	  /* note this -1 approach to setting the packet is a workaround for a common failure. setting 
+ 	     to 0 would work just incur a huge penalty in videos that needed -1. Might be worth testing.
+ 	  */
+-	  if (packet.flags & PKT_FLAG_KEY)
++	  if (packet.flags & AV_PKT_FLAG_KEY)
+ 	    {
+ 	      //fprintf(stderr, "Packet: (F:%d %lld %lld)\n", context->current_frame_index, packet.pts, packet.dts);
+ 	      
diff -Nru imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/series imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/series
--- imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/series	2011-02-19 04:08:59.000000000 +0100
+++ imageshack-uploader-2.2+hg20100408.d802dea89428/debian/patches/series	2011-07-14 22:02:55.000000000 +0200
@@ -1,2 +1,3 @@
 1001-fix-ffmpeg-6.0.diff
 1000-proper-desktop-file.diff
+fix-FTBFS-libav-0.7.patch

Reply via email to