Package: guvcview / 2.0.4+debian-1

ffmpeg3.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: Replace deprecated FFmpeg API 
Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Last-Update: <2016-06-23>

diff --git a/gview_v4l2core/jpeg_decoder.c b/gview_v4l2core/jpeg_decoder.c
index ebad53d..2517a51 100644
--- a/gview_v4l2core/jpeg_decoder.c
+++ b/gview_v4l2core/jpeg_decoder.c
@@ -1436,7 +1436,11 @@ int jpeg_init_decoder(int width, int height)
 		exit(-1);
 	}
 
+#if LIBAVCODEC_VER_AT_LEAST(57,01)
+	codec_data->context->pix_fmt = AV_PIX_FMT_YUV422P;
+#else
 	codec_data->context->pix_fmt = PIX_FMT_YUV422P;
+#endif
 	codec_data->context->width = width;
 	codec_data->context->height = height;
 	//jpeg_ctx->context->dsp_mask = (FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE);
diff --git a/gview_v4l2core/uvc_h264.c b/gview_v4l2core/uvc_h264.c
index 8c7e9a5..27d423c 100644
--- a/gview_v4l2core/uvc_h264.c
+++ b/gview_v4l2core/uvc_h264.c
@@ -1036,7 +1036,11 @@ int h264_init_decoder(int width, int height)
 	}
 	
 	h264_ctx->context->flags2 |= CODEC_FLAG2_FAST;
-	h264_ctx->context->pix_fmt = PIX_FMT_YUV420P;
+#if LIBAVCODEC_VER_AT_LEAST(57,01)
+	h264_ctx->context->pix_fmt = AV_PIX_FMT_YUV422P;
+#else
+	h264_ctx->context->pix_fmt = PIX_FMT_YUV422P;
+#endif
 	h264_ctx->context->width = width;
 	h264_ctx->context->height = height;
 	//h264_ctx->context->dsp_mask = (FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE);