---
libavcodec/apv_decode.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/apv_decode.c b/libavcodec/apv_decode.c
index b1e1db7d64..2a59c9b25d 100644
--- a/libavcodec/apv_decode.c
+++ b/libavcodec/apv_decode.c
@@ -377,7 +377,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:
@@ -412,8 +412,11 @@ static int apv_decode_frame(AVCodecContext *avctx, AVFrame
*frame,
}
ff_cbs_fragment_reset(au);
-
return packet->size;
+
+fail:
+ ff_cbs_fragment_reset(au);
+ return err;
}
const FFCodec ff_apv_decoder = {
--
2.47.2
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".