mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_dnn_detect: Fix null pointer dereference
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
f7a1453f27
commit
553c572204
|
@ -807,11 +807,13 @@ static av_cold void dnn_detect_uninit(AVFilterContext *context)
|
||||||
DnnDetectContext *ctx = context->priv;
|
DnnDetectContext *ctx = context->priv;
|
||||||
AVDetectionBBox *bbox;
|
AVDetectionBBox *bbox;
|
||||||
ff_dnn_uninit(&ctx->dnnctx);
|
ff_dnn_uninit(&ctx->dnnctx);
|
||||||
|
if (ctx->bboxes_fifo) {
|
||||||
while (av_fifo_can_read(ctx->bboxes_fifo)) {
|
while (av_fifo_can_read(ctx->bboxes_fifo)) {
|
||||||
av_fifo_read(ctx->bboxes_fifo, &bbox, 1);
|
av_fifo_read(ctx->bboxes_fifo, &bbox, 1);
|
||||||
av_freep(&bbox);
|
av_freep(&bbox);
|
||||||
}
|
}
|
||||||
av_fifo_freep2(&ctx->bboxes_fifo);
|
av_fifo_freep2(&ctx->bboxes_fifo);
|
||||||
|
}
|
||||||
av_freep(&ctx->anchors);
|
av_freep(&ctx->anchors);
|
||||||
free_detect_labels(ctx);
|
free_detect_labels(ctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue