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>
release/5.1
Andreas Schneider 3 years ago committed by Marton Balint
parent c9a2996544
commit 59018254c7
  1. 2
      libavcodec/libopenh264dec.c
  2. 2
      libavcodec/libopenh264enc.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");

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

Loading…
Cancel
Save