1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

apv_decode: Fix memory leak on decode error

This commit is contained in:
Mark Thompson
2025-05-03 17:46:29 +01:00
parent 135acc8e61
commit 5acd2145a4

View File

@ -385,7 +385,7 @@ static int apv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
case APV_PBU_PRIMARY_FRAME:
err = apv_decode(avctx, frame, pbu->content);
if (err < 0)
return err;
goto fail;
*got_frame = 1;
break;
case APV_PBU_METADATA:
@ -419,9 +419,10 @@ static int apv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
}
}
err = packet->size;
fail:
ff_cbs_fragment_reset(au);
return packet->size;
return err;
}
const FFCodec ff_apv_decoder = {