SHA256
1
0
forked from jengelh/ffmpeg-5
ffmpeg-5/ffmpeg-openh264-averr-on-bad-version.patch
Jan Engelhardt 39e4085d5f Accepting request 955956 from home:Pharaoh_Atem:branches:multimedia:libs
- Add patch to fix error returned with bad versions of OpenH264
  + Patch: ffmpeg-openh264-averr-on-bad-version.patch
- Enable OpenH264 as an H.264 codec via dlopen using patch from Fedora
  + Patch: ffmpeg-dlopen-openh264.patch
- Add source and script for headers for dlopening OpenH264
  + Source: ffmpeg-dlopen-headers.tar.xz
  + Source: ffmpeg_get_dlopen_headers.sh

OBS-URL: https://build.opensuse.org/request/show/955956
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-5?expand=0&rev=7
2022-02-18 23:08:40 +00:00

39 lines
1.5 KiB
Diff

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");