mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavfi/thumbnail: use avfilter_unref_bufferp() where appropriate.
This commit is contained in:
parent
24f425319d
commit
782993d9e4
1 changed files with 3 additions and 6 deletions
|
|
@ -135,8 +135,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
|
|||
memset(thumb->frames[i].histogram, 0, sizeof(thumb->frames[i].histogram));
|
||||
if (i == best_frame_idx)
|
||||
continue;
|
||||
avfilter_unref_buffer(thumb->frames[i].buf);
|
||||
thumb->frames[i].buf = NULL;
|
||||
avfilter_unref_bufferp(&thumb->frames[i].buf);
|
||||
}
|
||||
thumb->n = 0;
|
||||
|
||||
|
|
@ -152,10 +151,8 @@ static av_cold void uninit(AVFilterContext *ctx)
|
|||
{
|
||||
int i;
|
||||
ThumbContext *thumb = ctx->priv;
|
||||
for (i = 0; i < thumb->n_frames && thumb->frames[i].buf; i++) {
|
||||
avfilter_unref_buffer(thumb->frames[i].buf);
|
||||
thumb->frames[i].buf = NULL;
|
||||
}
|
||||
for (i = 0; i < thumb->n_frames && thumb->frames[i].buf; i++)
|
||||
avfilter_unref_bufferp(&thumb->frames[i].buf);
|
||||
av_freep(&thumb->frames);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue