Add patch to return correct AVERROR with bad OpenH264 versions
This commit is contained in:
parent
c47175923b
commit
5b62d5dd33
38
ffmpeg-openh264-averr-on-bad-version.patch
Normal file
38
ffmpeg-openh264-averr-on-bad-version.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From b3b0ff6ef4b5bb3e2bf9649f1d7130f123f90099 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
Date: Fri, 18 Feb 2022 13:42:17 +0100
|
||||||
|
Subject: [PATCH] avcodec/openh264: Return (DE|EN)CODER_NOT_FOUND if version
|
||||||
|
check fails
|
||||||
|
|
||||||
|
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
---
|
||||||
|
libavcodec/libopenh264dec.c | 2 +-
|
||||||
|
libavcodec/libopenh264enc.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
|
||||||
|
index 7f5e85402a26..97d3630df6cf 100644
|
||||||
|
--- a/libavcodec/libopenh264dec.c
|
||||||
|
+++ b/libavcodec/libopenh264dec.c
|
||||||
|
@@ -56,7 +56,7 @@ static av_cold int svc_decode_init(AVCodecContext *avctx)
|
||||||
|
WelsTraceCallback callback_function;
|
||||||
|
|
||||||
|
if ((err = ff_libopenh264_check_version(avctx)) < 0)
|
||||||
|
- return err;
|
||||||
|
+ return AVERROR_DECODER_NOT_FOUND;
|
||||||
|
|
||||||
|
if (WelsCreateDecoder(&s->decoder)) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n");
|
||||||
|
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
|
||||||
|
index de4b85c411e0..2001dc22b4c3 100644
|
||||||
|
--- a/libavcodec/libopenh264enc.c
|
||||||
|
+++ b/libavcodec/libopenh264enc.c
|
||||||
|
@@ -137,7 +137,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
|
||||||
|
AVCPBProperties *props;
|
||||||
|
|
||||||
|
if ((err = ff_libopenh264_check_version(avctx)) < 0)
|
||||||
|
- return err;
|
||||||
|
+ return AVERROR_ENCODER_NOT_FOUND;
|
||||||
|
|
||||||
|
if (WelsCreateSVCEncoder(&s->encoder)) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n");
|
@ -69,7 +69,7 @@ Name: ffmpeg
|
|||||||
%global pkg_name %{name}%{?pkg_suffix}
|
%global pkg_name %{name}%{?pkg_suffix}
|
||||||
|
|
||||||
Version: 5.0
|
Version: 5.0
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: A complete solution to record, convert and stream audio and video
|
Summary: A complete solution to record, convert and stream audio and video
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://ffmpeg.org/
|
URL: https://ffmpeg.org/
|
||||||
@ -103,6 +103,8 @@ Patch5: ffmpeg-allow-fdk-aac-free.patch
|
|||||||
Patch6: ffmpeg-fix-gnutls-priority.patch
|
Patch6: ffmpeg-fix-gnutls-priority.patch
|
||||||
# https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285401.html
|
# https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285401.html
|
||||||
Patch7: ffmpeg-support-chromium.patch
|
Patch7: ffmpeg-support-chromium.patch
|
||||||
|
# http://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293194.html
|
||||||
|
Patch8: ffmpeg-openh264-averr-on-bad-version.patch
|
||||||
|
|
||||||
# Set up dlopen for openh264
|
# Set up dlopen for openh264
|
||||||
Patch1001: ffmpeg-dlopen-openh264.patch
|
Patch1001: ffmpeg-dlopen-openh264.patch
|
||||||
@ -818,6 +820,9 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
|
|||||||
%{_mandir}/man3/libswscale.3*
|
%{_mandir}/man3/libswscale.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 18 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.0-8
|
||||||
|
- Add patch to return correct AVERROR with bad OpenH264 versions
|
||||||
|
|
||||||
* Fri Feb 18 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.0-7
|
* Fri Feb 18 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.0-7
|
||||||
- Update OpenH264 dlopen patch to split dlopen code into c and h files
|
- Update OpenH264 dlopen patch to split dlopen code into c and h files
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user