Package: shotdetect
Version: 1.0.86-1
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Dear Maintainer,

shotdetect FTBFS with the latest libav that you can find in experimental, with 
the following error:
....
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../resources/ -I/usr/include/ffmpeg 
`xslt-config --cflags`  -D_FORTIFY_SOURCE=2  -g -O2 -fPIE -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -c -o film.o film.cpp
film.cpp: In member function 'int film::process()':
film.cpp:215:74: error: 'av_open_input_file' was not declared in this scope
film.cpp:226:38: error: 'av_find_stream_info' was not declared in this scope
film.cpp:273:52: error: 'avcodec_open' was not declared in this scope
film.cpp:288:42: error: 'avcodec_open' was not declared in this scope
film.cpp:457:3: warning: 'void av_close_input_file(AVFormatContext*)' is 
deprecated (declared at /usr/include/libavformat/avformat.h:1391) 
[-Wdeprecated-declarations]
film.cpp:457:34: warning: 'void av_close_input_file(AVFormatContext*)' is 
deprecated (declared at /usr/include/libavformat/avformat.h:1391) 
[-Wdeprecated-declarations]
film.cpp: In member function 'void film::process_audio()':
film.cpp:498:14: warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, 
int*, AVPacket*)' is deprecated (declared at 
/usr/include/libavcodec/avcodec.h:3568) [-Wdeprecated-declarations]
film.cpp:498:82: warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, 
int*, AVPacket*)' is deprecated (declared at 
/usr/include/libavcodec/avcodec.h:3568) [-Wdeprecated-declarations]
make[3]: *** [film.o] Error 1

In Ubuntu, we've applied the following patch to fix this FTBFS.

*** /tmp/tmppNROC7/bug_body

Thanks for considering it.

Fabrice

-- System Information:
Debian Release: wheezy/sid
  APT prefers quantal-updates
  APT policy: (500, 'quantal-updates'), (500, 'quantal-security'), (500, 
'quantal')
Architecture: i386 (i686)

Kernel: Linux 3.5.0-18-generic (SMP w/1 CPU core)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru shotdetect-1.0.86/debian/patches/fix-FTBFS-libav0.9.patch shotdetect-1.0.86/debian/patches/fix-FTBFS-libav0.9.patch
--- shotdetect-1.0.86/debian/patches/fix-FTBFS-libav0.9.patch	1970-01-01 01:00:00.000000000 +0100
+++ shotdetect-1.0.86/debian/patches/fix-FTBFS-libav0.9.patch	2012-11-24 18:43:36.000000000 +0100
@@ -0,0 +1,40 @@
+Description: Fix FTBFS with libav 0.9 by replacing deprecated functions
+Author: Fabrice Coutadeur <fabric...@ubuntu.com>
+--- a/src/film.cpp
++++ b/src/film.cpp
+@@ -212,7 +212,7 @@
+    */
+   av_register_all ();
+ 
+-  if (av_open_input_file (&pFormatCtx, input_path.c_str (), NULL, 0, NULL) != 0)
++  if (avformat_open_input (&pFormatCtx, input_path.c_str (), NULL, NULL) != 0)
+     {
+       string error_msg = "Impossible to open file";
+       error_msg += input_path;
+@@ -223,7 +223,7 @@
+   /*
+    * Retrieve stream information 
+    */
+-  if (av_find_stream_info (pFormatCtx) < 0)
++  if (avformat_find_stream_info (pFormatCtx, NULL) < 0)
+     return -1;			// Couldn't find stream information
+ 
+ 
+@@ -270,7 +270,7 @@
+ 
+       if (pCodecAudio == NULL)
+ 	return -1;		// Codec not found
+-      if (avcodec_open (pCodecCtxAudio, pCodecAudio) < 0)
++      if (avcodec_open2 (pCodecCtxAudio, pCodecAudio, NULL) < 0)
+ 	return -1;		// Could not open codec
+ 
+     }
+@@ -285,7 +285,7 @@
+ 
+       if (pCodec == NULL)
+ 	return -1;		// Codec not found
+-      if (avcodec_open (pCodecCtx, pCodec) < 0)
++      if (avcodec_open2 (pCodecCtx, pCodec, NULL) < 0)
+ 	return -1;		// Could not open codec
+ 
+       /*
diff -Nru shotdetect-1.0.86/debian/patches/series shotdetect-1.0.86/debian/patches/series
--- shotdetect-1.0.86/debian/patches/series	2012-01-18 01:20:40.000000000 +0100
+++ shotdetect-1.0.86/debian/patches/series	2012-11-24 18:20:01.000000000 +0100
@@ -1 +1,2 @@
 compilation_fixes.patch
+fix-FTBFS-libav0.9.patch

Reply via email to