[Forensics-changes] [SCM] debian-forensics/libphash branch, debian, updated. debian/0.9.4-1-11-gc45603c

Julien Valroff julien at kirya.net
Fri Aug 19 13:30:35 UTC 2011


The following commit has been merged in the debian branch:
commit b79267aadb288452077a94e0d0dbdc258aa24e6a
Author: Julien Valroff <julien at kirya.net>
Date:   Thu Aug 18 18:25:37 2011 +0200

    Apply patch from Ubuntu to fix FTBFS against libav (thanks to Moritz Muehlenhoff <jmm at debian.org> for pointing to the patch and to Andreas Moog <amoog at ubuntu.com> for writing it)

diff --git a/debian/changelog b/debian/changelog
index 9f4df91..3c31da7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ libphash (0.9.4-2) unstable; urgency=low
   * Team upload.
   * Switch to 3.0 (quilt) source package format 
   * Bump debhelper compat to 8 
+  * Apply patch from Ubuntu to fix FTBFS against libav (thanks to Moritz
+    Muehlenhoff <jmm at debian.org> for pointing to the patch and to Andreas Moog
+    <amoog at ubuntu.com> for writing it) 
 
- -- Julien Valroff <julien at debian.org>  Thu, 18 Aug 2011 18:19:04 +0200
+ -- Julien Valroff <julien at debian.org>  Thu, 18 Aug 2011 18:23:18 +0200
 
 libphash (0.9.4-1.1) unstable; urgency=low
 
diff --git a/debian/patches/001_FTBFS_libav0.7.diff b/debian/patches/001_FTBFS_libav0.7.diff
new file mode 100644
index 0000000..c97d3b9
--- /dev/null
+++ b/debian/patches/001_FTBFS_libav0.7.diff
@@ -0,0 +1,90 @@
+Description: libav0.7 removed some deprecated functions, causing this
+ package to FTBFS. This patch replaces the function calls with the new
+ ones.
+Author: Andreas Moog <amoog at ubuntu.com>
+
+--- a/src/cimgffmpeg.cpp
++++ b/src/cimgffmpeg.cpp
+@@ -67,7 +67,7 @@
+ 	    // Find the video stream
+ 	    for(i=0; i<st_info->pFormatCtx->nb_streams; i++)
+ 	    {
+-		if(st_info->pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) 
++		if(st_info->pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) 
+ 	        {
+ 		    st_info->videoStream=i;
+ 		    break;
+@@ -123,6 +123,10 @@
+ 	int size = 0;
+ 	
+ 	AVPacket packet;
++
++	AVPacket avpacket;
++	av_init_packet(&avpacket);
++
+ 	int result = 1;
+ 	CImg<uint8_t> next_image;
+ 	SwsContext *c = sws_getContext(st_info->pCodecCtx->width, st_info->pCodecCtx->height, st_info->pCodecCtx->pix_fmt, st_info->width, st_info->height, ffmpeg_pixfmt , SWS_BICUBIC, NULL, NULL, NULL);
+@@ -131,7 +135,10 @@
+           if (result < 0)
+ 	      break;
+     	  if(packet.stream_index==st_info->videoStream) {
+-	      avcodec_decode_video(st_info->pCodecCtx, pFrame, &frameFinished,packet.data, packet.size);
++	      avpacket.data = packet.data;
++	      avpacket.size = packet.size;
++	      avpacket.flags = AV_PKT_FLAG_KEY;
++	      avcodec_decode_video2(st_info->pCodecCtx, pFrame, &frameFinished, &avpacket);
+ 	      if(frameFinished) {
+ 		  if (st_info->current_index == st_info->next_index){
+ 		      st_info->next_index += st_info->step;
+@@ -213,7 +220,7 @@
+ 		// Find the video stream
+ 		for(i=0; i< st_info->pFormatCtx->nb_streams; i++)
+ 		{
+-			if(st_info->pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) 
++			if(st_info->pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) 
+ 			{
+ 				st_info->videoStream=i;
+ 				break;
+@@ -268,6 +275,10 @@
+ 	int frameFinished;
+ 	int size = 0;
+ 	AVPacket packet;
++
++	AVPacket avpacket;
++	av_init_packet(&avpacket);
++
+ 	int result = 1;
+ 	CImg<uint8_t> next_image;
+ 	SwsContext *c = sws_getContext(st_info->pCodecCtx->width, st_info->pCodecCtx->height, st_info->pCodecCtx->pix_fmt, st_info->width, st_info->height, ffmpeg_pixfmt , SWS_BICUBIC, NULL, NULL, NULL);
+@@ -279,8 +290,10 @@
+ 			break;
+ 		if(packet.stream_index == st_info->videoStream) {
+ 			
+-		    avcodec_decode_video(st_info->pCodecCtx, pFrame, &frameFinished,
+-		                         packet.data,packet.size);
++		    avpacket.data = packet.data;
++		    avpacket.size = packet.size;
++		    avpacket.flags = AV_PKT_FLAG_KEY;
++		    avcodec_decode_video2(st_info->pCodecCtx, pFrame, &frameFinished, &avpacket);
+  
+ 		    if(frameFinished) {
+ 		    	if (st_info->current_index == st_info->next_index)
+@@ -365,7 +378,7 @@
+ 	int videoStream=-1;
+ 	for(unsigned int i=0; i<pFormatCtx->nb_streams; i++)
+ 	{
+-	     if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) 
++	     if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) 
+ 	     {
+ 		    videoStream=i;
+ 		    break;
+@@ -407,7 +420,7 @@
+ 	int videoStream=-1;
+ 	for(unsigned int i=0; i<pFormatCtx->nb_streams; i++)
+ 	{
+-		     if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) 
++		     if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) 
+ 		     {
+ 			    videoStream=i;
+ 			    break;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8a6c44f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+001_FTBFS_libav0.7.diff

-- 
debian-forensics/libphash



More information about the forensics-changes mailing list