public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/guvcview] epel9-next: Fix build with FFmpeg 8
@ 2026-07-21 17:26 Dominik Mierzejewski
  0 siblings, 0 replies; only message in thread
From: Dominik Mierzejewski @ 2026-07-21 17:26 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/guvcview
Branch : epel9-next
Commit : 2cb52fe8bbe6dc4764dfd4af657be87cc7017377
Author : Dominik Mierzejewski <dominik@greysector.net>
Date   : 2025-10-11T12:31:13+02:00
Stats  : +135/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/guvcview/c/2cb52fe8bbe6dc4764dfd4af657be87cc7017377?branch=epel9-next

Log:
Fix build with FFmpeg 8

---
diff --git a/guvcview-ffmpeg8.patch b/guvcview-ffmpeg8.patch
new file mode 100644
index 0000000..cf76cc7
--- /dev/null
+++ b/guvcview-ffmpeg8.patch
@@ -0,0 +1,129 @@
+diff -up guvcview-src-2.1.0/gview_encoder/audio_codecs.c.orig guvcview-src-2.1.0/gview_encoder/audio_codecs.c
+--- guvcview-src-2.1.0/gview_encoder/audio_codecs.c.orig	2024-01-22 15:08:43.000000000 +0100
++++ guvcview-src-2.1.0/gview_encoder/audio_codecs.c	2025-10-11 12:27:47.514947849 +0200
+@@ -39,7 +39,7 @@ extern int enc_verbosity;
+ 
+ /* AAC object types index: MAIN = 1; LOW = 2; SSR = 3; LTP = 4*/
+ static int AAC_OBJ_TYPE[5] =
+-	{ FF_PROFILE_UNKNOWN, FF_PROFILE_AAC_MAIN, FF_PROFILE_AAC_LOW, FF_PROFILE_AAC_SSR, FF_PROFILE_AAC_LTP };
++	{ AV_PROFILE_UNKNOWN, AV_PROFILE_AAC_MAIN, AV_PROFILE_AAC_LOW, AV_PROFILE_AAC_SSR, AV_PROFILE_AAC_LTP };
+ /*-1 = reserved; 0 = freq. is writen explictly (increases header by 24 bits)*/
+ static int AAC_SAMP_FREQ[16] =
+ 	{ 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350, -1, -1, 0};
+@@ -65,7 +65,7 @@ static audio_codec_t listSupCodecs[] = /
+ 		.codec_id     = AV_CODEC_ID_PCM_F32LE,
+ 		.codec_name   = "pcm_f32le",
+ 		.sample_format = AV_SAMPLE_FMT_FLT,
+-		.profile      = FF_PROFILE_UNKNOWN,
++		.profile      = AV_PROFILE_UNKNOWN,
+ 		.mkv_codpriv  = NULL,
+ 		.codpriv_size = 0,
+ 		.flags        = 0,
+@@ -82,7 +82,7 @@ static audio_codec_t listSupCodecs[] = /
+ 		.codec_id     = AV_CODEC_ID_MP2,
+ 		.codec_name   = "mp2",
+ 		.sample_format = AV_SAMPLE_FMT_S16,
+-		.profile      = FF_PROFILE_UNKNOWN,
++		.profile      = AV_PROFILE_UNKNOWN,
+ 		.mkv_codpriv  = NULL,
+ 		.codpriv_size = 0,
+ 		.flags        = 0,
+@@ -103,7 +103,7 @@ static audio_codec_t listSupCodecs[] = /
+ #else
+ 		.sample_format = AV_SAMPLE_FMT_S16,
+ #endif
+-		.profile      = FF_PROFILE_UNKNOWN,
++		.profile      = AV_PROFILE_UNKNOWN,
+ 		.mkv_codpriv  = NULL,
+ 		.codpriv_size = 0,
+ 		.flags        = 0,
+@@ -124,7 +124,7 @@ static audio_codec_t listSupCodecs[] = /
+ #else
+ 		.sample_format = AV_SAMPLE_FMT_FLT,
+ #endif
+-		.profile      = FF_PROFILE_UNKNOWN,
++		.profile      = AV_PROFILE_UNKNOWN,
+ 		.mkv_codpriv  = NULL,
+ 		.codpriv_size = 0,
+ 		.flags        = 0,
+@@ -145,7 +145,7 @@ static audio_codec_t listSupCodecs[] = /
+ #else
+ 		.sample_format = AV_SAMPLE_FMT_S16,
+ #endif
+-		.profile      = FF_PROFILE_AAC_LOW,
++		.profile      = AV_PROFILE_AAC_LOW,
+ 		.mkv_codpriv  = AAC_ESDS,
+ 		.codpriv_size = 2,
+ 		.flags        = 0,
+@@ -166,7 +166,7 @@ static audio_codec_t listSupCodecs[] = /
+ #else
+ 		.sample_format = AV_SAMPLE_FMT_S16,
+ #endif
+-		.profile      = FF_PROFILE_UNKNOWN,
++		.profile      = AV_PROFILE_UNKNOWN,
+ 		.mkv_codpriv  =  NULL,
+ 		.codpriv_size =  0,
+ 		.flags        = 0,
+diff -up guvcview-src-2.1.0/gview_encoder/encoder.c.orig guvcview-src-2.1.0/gview_encoder/encoder.c
+--- guvcview-src-2.1.0/gview_encoder/encoder.c.orig	2024-01-22 15:08:43.000000000 +0100
++++ guvcview-src-2.1.0/gview_encoder/encoder.c	2025-10-11 12:14:00.647920400 +0200
+@@ -1992,7 +1992,7 @@ void encoder_close(encoder_context_t *en
+ 				avcodec_flush_buffers(video_codec_data->codec_context);
+ 				enc_video_ctx->flushed_buffers = 1;
+ 			}
+-			avcodec_close(video_codec_data->codec_context);
++			avcodec_free_context(&video_codec_data->codec_context);
+ 			free(video_codec_data->codec_context);
+ 
+ 			av_dict_free(&(video_codec_data->private_options));
+@@ -2024,7 +2024,7 @@ void encoder_close(encoder_context_t *en
+ 		{
+ 			avcodec_flush_buffers(audio_codec_data->codec_context);
+ 
+-			avcodec_close(audio_codec_data->codec_context);
++			avcodec_free_context(&audio_codec_data->codec_context);
+ 			free(audio_codec_data->codec_context);
+ 
+ 			if (audio_codec_data->frame)
+diff -up guvcview-src-2.1.0/gview_v4l2core/jpeg_decoder.c.orig guvcview-src-2.1.0/gview_v4l2core/jpeg_decoder.c
+--- guvcview-src-2.1.0/gview_v4l2core/jpeg_decoder.c.orig	2025-10-11 12:04:24.068488665 +0200
++++ guvcview-src-2.1.0/gview_v4l2core/jpeg_decoder.c	2025-10-11 12:13:13.710480851 +0200
+@@ -1435,7 +1435,7 @@ int jpeg_init_decoder(int width, int hei
+ #endif
+ 	{
+ 		fprintf(stderr, "V4L2_CORE: (mjpeg decoder) couldn't open codec\n");
+-		avcodec_close(codec_data->context);
++		avcodec_free_context(&codec_data->context);
+ 		free(codec_data->context);
+ 		free(codec_data);
+ 		free(jpeg_ctx);
+@@ -1558,7 +1558,7 @@ void jpeg_close_decoder()
+ 
+ 	codec_data_t *codec_data = (codec_data_t *) jpeg_ctx->codec_data;
+ 
+-	avcodec_close(codec_data->context);
++	avcodec_free_context(&codec_data->context);
+ 
+ 	free(codec_data->context);
+ 
+diff -up guvcview-src-2.1.0/gview_v4l2core/uvc_h264.c.orig guvcview-src-2.1.0/gview_v4l2core/uvc_h264.c
+--- guvcview-src-2.1.0/gview_v4l2core/uvc_h264.c.orig	2025-10-11 12:04:24.068713759 +0200
++++ guvcview-src-2.1.0/gview_v4l2core/uvc_h264.c	2025-10-11 12:13:37.913043590 +0200
+@@ -1033,7 +1033,7 @@ int h264_init_decoder(int width, int hei
+ #endif
+ 	{
+ 		fprintf(stderr, "V4L2_CORE: (H264 decoder) couldn't open codec\n");
+-		avcodec_close(h264_ctx->context);
++		avcodec_free_context(&h264_ctx->context);
+ 		free(h264_ctx->context);
+ 		free(h264_ctx);
+ 		h264_ctx = NULL;
+@@ -1143,7 +1143,7 @@ void h264_close_decoder()
+ 	if(h264_ctx == NULL)
+ 		return;
+ 
+-	avcodec_close(h264_ctx->context);
++	avcodec_free_context(&h264_ctx->context);
+ 
+ 	free(h264_ctx->context);
+ 

diff --git a/guvcview.spec b/guvcview.spec
index 389ea1a..89746c2 100644
--- a/guvcview.spec
+++ b/guvcview.spec
@@ -2,7 +2,7 @@
 
 Name:           guvcview
 Version:        2.1.0
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        GTK+ UVC Viewer and Capturer
 License:        GPL-2.0-or-later
 URL:            http://guvcview.sourceforge.net/
@@ -11,6 +11,8 @@ Source0:        http://downloads.sourceforge.net/%{name}/%{name}-src-%{version}.
 # Add missing includes to fix build
 # https://sourceforge.net/p/guvcview/tickets/75/
 Patch:          0001-Add-missing-libavutil-includes-for-av_image_get_buff.patch
+# Fix build with FFmpeg 8
+Patch:          %{name}-ffmpeg8.patch
 
 BuildRequires:  autoconf automake libtool
 BuildRequires:  gettext-devel intltool
@@ -119,6 +121,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/%{name}.appda
 
 
 %changelog
+* Sat Oct 11 2025 Dominik Mierzejewski <dominik@greysector.net> - 2.1.0-8
+- Fix build with FFmpeg 8
+
 * Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-21 17:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21 17:26 [rpms/guvcview] epel9-next: Fix build with FFmpeg 8 Dominik Mierzejewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox