Package: shotdetect Version: 1.0.86-4 Severity: important Tags: patch User: pkg-multimedia-maintainers@lists.alioth.debian.org Usertags: ffmpeg2.9
Dear Maintainer, your package fails to build with the upcoming ffmpeg 2.9. This bug will become release-critical at some point when the ffmpeg2.9 transition gets closer. Attached is a patch replacing the deprecated functionality. It also works with ffmpeg 2.8. Please apply this patch and forward it upstream, if necessary. These changes have little regression potential. Best regards, Andreas
diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch new file mode 100644 index 0000000..5a75ef0 --- /dev/null +++ b/debian/patches/ffmpeg_2.9.patch @@ -0,0 +1,68 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Last-Update: <2015-11-02> + +--- shotdetect-1.0.86.orig/src/film.cpp ++++ shotdetect-1.0.86/src/film.cpp +@@ -292,14 +292,14 @@ film::process () + /* + * 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 @@ film::process () + /* + * 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 @@ film::process () + 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 @@ film::process () + 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 @@ film::process () + */ + 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); + } + /* diff --git a/debian/patches/series b/debian/patches/series index a9283dd..777acd1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 1004-fix_comments_and_names.patch libav10.patch +ffmpeg_2.9.patch
_______________________________________________ pkg-multimedia-maintainers mailing list pkg-multimedia-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers