Package: lynkeos.app
Version: 1.2-7
Severity: important
Tags: patch
User: [email protected]
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..b86d4bd
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,28 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2015-11-02>
+
+--- lynkeos.app-1.2.orig/Sources/ffmpeg_access.c
++++ lynkeos.app-1.2/Sources/ffmpeg_access.c
+@@ -59,7 +59,7 @@ int ffmpegNextFrame(FfmpegMovie* movie){
+ int ffmpegConvertCurrentFrame (FfmpegMovie* movie)
+ {
+   img_convert_ctx = sws_getContext (movie->pCodecCtx->width,
+-				    movie->pCodecCtx->height, PIX_FMT_RGB24,
++				    movie->pCodecCtx->height, AV_PIX_FMT_RGB24,
+ 				    movie->pCodecCtx->width,
+ 				    movie->pCodecCtx->height,
+ 				    movie->pCodecCtx->pix_fmt, SWS_BICUBIC,
+@@ -309,10 +309,10 @@ int ffmpegLoadMovie(const char* movieNam
+     pFrameRGB=av_frame_alloc();
+ 
+     // Determine required buffer size and allocate buffer
+-    numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,pCodecCtx->height);
++    numBytes=avpicture_get_size(AV_PIX_FMT_RGB24, pCodecCtx->width,pCodecCtx->height);
+     buffer = (uint8_t*) malloc(sizeof(uint8_t)*numBytes);
+     // Assign appropriate parts of buffer to image planes in pFrameRGB
+-    avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,pCodecCtx->width, pCodecCtx->height);
++    avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24,pCodecCtx->width, pCodecCtx->height);
+     
+     resultMovie->pFormatCtx = pFormatCtx;
+     resultMovie->pCodecCtx = pCodecCtx;
diff --git a/debian/patches/series b/debian/patches/series
index 3c2c27d..c71a761 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ libav-9.patch
 libav-10.patch
 format-security.patch
 gcc-warnings.patch
+ffmpeg_2.9.patch

Reply via email to