X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibopenh264dec.c;h=26cc8db9d16eea4e84846dba920d9d6aefe108da;hb=55eab1733b9e730ceac33edce9aab56c17ea87b2;hp=ab0a84c6981d0455be2cfae13868bde3b79acf19;hpb=da97b244b04b48b827ece6d9635a1d1d1cf2021a;p=ffmpeg diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c index ab0a84c6981..26cc8db9d16 100644 --- a/libavcodec/libopenh264dec.c +++ b/libavcodec/libopenh264dec.c @@ -72,15 +72,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx) return err; s->packet_fifo = av_fifo_alloc(sizeof(AVPacket)); - if (!s->packet_fifo) { - err = AVERROR(ENOMEM); - goto fail; - } + if (!s->packet_fifo) + return AVERROR(ENOMEM); if (WelsCreateDecoder(&s->decoder)) { av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n"); - err = AVERROR_UNKNOWN; - goto fail; + return AVERROR_UNKNOWN; } // Pass all libopenh264 messages to our callback, to allow ourselves to filter them. @@ -98,14 +95,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx) if ((*s->decoder)->Initialize(s->decoder, ¶m) != cmResultSuccess) { av_log(avctx, AV_LOG_ERROR, "Initialize failed\n"); - err = AVERROR_UNKNOWN; - goto fail; + return AVERROR_UNKNOWN; } avctx->pix_fmt = AV_PIX_FMT_YUV420P; -fail: - return err; + return 0; } static int init_bsf(AVCodecContext *avctx)