Zhao Zhili: > From: Zhao Zhili <[email protected]> > > Signed-off-by: Zhao Zhili <[email protected]> > --- > libavfilter/vf_dnn_detect.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c > index b4eee06fe7..2a277d4169 100644 > --- a/libavfilter/vf_dnn_detect.c > +++ b/libavfilter/vf_dnn_detect.c > @@ -807,11 +807,13 @@ static av_cold void dnn_detect_uninit(AVFilterContext > *context) > DnnDetectContext *ctx = context->priv; > AVDetectionBBox *bbox; > ff_dnn_uninit(&ctx->dnnctx); > - while(av_fifo_can_read(ctx->bboxes_fifo)) { > - av_fifo_read(ctx->bboxes_fifo, &bbox, 1); > - av_freep(&bbox); > + if (ctx->bboxes_fifo) { > + while (av_fifo_can_read(ctx->bboxes_fifo)) { > + av_fifo_read(ctx->bboxes_fifo, &bbox, 1); > + av_freep(&bbox); > + } > + av_fifo_freep2(&ctx->bboxes_fifo); > } > - av_fifo_freep2(&ctx->bboxes_fifo); > av_freep(&ctx->anchors); > free_detect_labels(ctx); > }
Please apply this patch soon; there is no need to wait for the other patches. (I independently stumbled upon this and sent a patch of my own.) - Andreas _______________________________________________ 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".
