Package: guvcview
Version: 2.0.2+debian-1
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..329aa54
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,37 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2015-11-02>
+
+--- 2.0.2+debian.orig/gview_encoder/encoder.c
++++ 2.0.2+debian/gview_encoder/encoder.c
+@@ -1434,7 +1434,7 @@
+ 		/*convert default yuyv to y420p (libav input format)*/		
+ 		switch(video_codec_data->codec_context->pix_fmt)
+ 		{
+-			case PIX_FMT_YUVJ420P:
++			case AV_PIX_FMT_YUVJ420P:
+ 				yuv422to420p(encoder_ctx, input_frame);
+ 				break;
+ 			default:
+--- 2.0.2+debian.orig/gview_v4l2core/jpeg_decoder.c
++++ 2.0.2+debian/gview_v4l2core/jpeg_decoder.c
+@@ -1436,7 +1436,7 @@
+ 		exit(-1);
+ 	}
+ 
+-	codec_data->context->pix_fmt = PIX_FMT_YUV422P;
++	codec_data->context->pix_fmt = AV_PIX_FMT_YUV422P;
+ 	codec_data->context->width = width;
+ 	codec_data->context->height = height;
+ 	//jpeg_ctx->context->dsp_mask = (FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE);
+--- 2.0.2+debian.orig/gview_v4l2core/uvc_h264.c
++++ 2.0.2+debian/gview_v4l2core/uvc_h264.c
+@@ -970,7 +970,7 @@
+ 	}
+ 	
+ 	h264_ctx->context->flags2 |= CODEC_FLAG2_FAST;
+-	h264_ctx->context->pix_fmt = PIX_FMT_YUV420P;
++	h264_ctx->context->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	h264_ctx->context->width = width;
+ 	h264_ctx->context->height = height;
+ 	//h264_ctx->context->dsp_mask = (FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE);
diff --git a/debian/patches/series b/debian/patches/series
index 7caba60..6b9384a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 update-manpage
+ffmpeg_2.9.patch

Reply via email to