[shotdetect] 01/08: Added 1008-fix-FTBFS-ffmpeg_2.9.patch

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue Nov 3 00:52:53 UTC 2015


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

giuliopaci-guest pushed a commit to branch master
in repository shotdetect.

commit cf14dbc9912d6e0b87ac7b6b889a7b9f805ed589
Author: Giulio Paci <giuliopaci at gmail.com>
Date:   Tue Nov 3 01:19:36 2015 +0100

    Added 1008-fix-FTBFS-ffmpeg_2.9.patch
---
 debian/patches/1008-fix-FTBFS-ffmpeg_2.9.patch | 68 ++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/debian/patches/1008-fix-FTBFS-ffmpeg_2.9.patch b/debian/patches/1008-fix-FTBFS-ffmpeg_2.9.patch
new file mode 100644
index 0000000..ef588c4
--- /dev/null
+++ b/debian/patches/1008-fix-FTBFS-ffmpeg_2.9.patch
@@ -0,0 +1,68 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+Last-Update: <2015-11-02>
+
+--- a/src/film.cpp
++++ b/src/film.cpp
+@@ -292,14 +292,14 @@
+       /*
+        * Allocate video frame 
+        */
+-      pFrame = avcodec_alloc_frame ();
+-      pFrameRGB = avcodec_alloc_frame ();
+-      pFrameRGBprev = avcodec_alloc_frame ();
++      pFrame = av_frame_alloc ();
++      pFrameRGB = av_frame_alloc ();
++      pFrameRGBprev = av_frame_alloc ();
+ 
+       /*
+        * Determine required buffer size and allocate buffer 
+        */
+-      numBytes = avpicture_get_size (PIX_FMT_RGB24, width, height);
++      numBytes = avpicture_get_size (AV_PIX_FMT_RGB24, width, height);
+ 
+       buffer = (uint8_t *) malloc (sizeof (uint8_t) * numBytes);
+       buffer2 = (uint8_t *) malloc (sizeof (uint8_t) * numBytes);
+@@ -307,9 +307,9 @@
+       /*
+        * Assign appropriate parts of buffer to image planes in pFrameRGB 
+        */
+-      avpicture_fill ((AVPicture *) pFrameRGB, buffer, PIX_FMT_RGB24, width, height);
++      avpicture_fill ((AVPicture *) pFrameRGB, buffer, AV_PIX_FMT_RGB24, width, height);
+ 
+-      avpicture_fill ((AVPicture *) pFrameRGBprev, buffer2, PIX_FMT_RGB24, width, height);
++      avpicture_fill ((AVPicture *) pFrameRGBprev, buffer2, AV_PIX_FMT_RGB24, width, height);
+ 
+ 
+       /*
+@@ -351,7 +351,7 @@
+ 	      if (! img_convert_ctx)
+ 		{
+ 		  img_convert_ctx = sws_getContext(width, height, pCodecCtx->pix_fmt,
+-						   width, height, PIX_FMT_RGB24, SWS_BICUBIC, 
++						   width, height, AV_PIX_FMT_RGB24, SWS_BICUBIC, 
+ 						   NULL, NULL, NULL);
+ 		  if (! img_convert_ctx) 
+ 		  {
+@@ -374,7 +374,7 @@
+ 				int src_width, int src_height)
+ 	      */
+ 	      /*
+-	      img_convert ((AVPicture *) pFrameRGB, PIX_FMT_RGB24, (AVPicture *) pFrame, pCodecCtx->pix_fmt, width, height);
++	      img_convert ((AVPicture *) pFrameRGB, AV_PIX_FMT_RGB24, (AVPicture *) pFrame, pCodecCtx->pix_fmt, width, height);
+ 	      */
+ 
+             this->frame_number ++;
+@@ -437,9 +437,9 @@
+        */
+       free (buffer);
+       free (buffer2);
+-      av_free (pFrameRGB);
+-      av_free (pFrame);
+-      av_free (pFrameRGBprev);
++      av_frame_free (&pFrameRGB);
++      av_frame_free (&pFrame);
++      av_frame_free (&pFrameRGBprev);
+       avcodec_close (pCodecCtx);
+     }
+   /*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-multimedia/shotdetect.git



More information about the pkg-multimedia-commits mailing list