You've already forked FFmpeg
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:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user