X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ftscc.c;h=6d03081bb0a3bdca8de2af076ba999bd646c67c0;hb=494f868e93d1d671497d0d0884368f015eb7d31e;hp=31e7caeeebe7a00c4b41300399e1848c46035887;hpb=7167ac33a8f2c7d063384c267f984f23d2b73854;p=ffmpeg diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index 31e7caeeebe..6d03081bb0a 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -103,7 +103,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return AVERROR_UNKNOWN; } - if ((ret = ff_reget_buffer(avctx, frame)) < 0) + if ((ret = ff_reget_buffer(avctx, frame, 0)) < 0) return ret; if (ret != Z_DATA_ERROR) { @@ -169,6 +169,8 @@ static av_cold int decode_init(AVCodecContext *avctx) } c->frame = av_frame_alloc(); + if (!c->frame) + return AVERROR(ENOMEM); return 0; } @@ -195,4 +197,5 @@ AVCodec ff_tscc_decoder = { .close = decode_end, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };