summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2022-02-18 13:53:19 +0100
committerMarton Balint <cus@passwd.hu>2022-07-08 00:49:37 +0200
commit59018254c7a178e4650ef63016493c75383a2076 (patch)
treef3e260aedf2f97ee16ed70f74f56ed16f19f2f43
parentc9a2996544187f67e533bc24f4cf773e50d2362b (diff)
downloadffmpeg-59018254c7a178e4650ef63016493c75383a2076.tar.gz
avcodec/openh264: return (DE|EN)CODER_NOT_FOUND if version check fails
A cosmetic change only, it basically just changes the user facing error message to clients that interpret the errors to something that makes sense. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--libavcodec/libopenh264dec.c2
-rw-r--r--libavcodec/libopenh264enc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index b3e522c31f..007f86b619 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -57,7 +57,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 f31ed2d4ca..db252aace1 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -138,7 +138,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");