[ffmpeg] free up frame buffers when seeding #2355

This commit is contained in:
nick black 2021-11-20 23:15:04 -05:00
parent d4d96d3bf2
commit 23eaac9ced
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -651,6 +651,7 @@ int ffmpeg_blit(ncvisual* ncv, int rows, int cols, ncplane* n,
} }
void ffmpeg_details_seed(ncvisual* ncv){ void ffmpeg_details_seed(ncvisual* ncv){
av_frame_unref(ncv->details->frame);
memset(ncv->details->frame, 0, sizeof(*ncv->details->frame)); memset(ncv->details->frame, 0, sizeof(*ncv->details->frame));
ncv->details->frame->linesize[0] = ncv->rowstride; ncv->details->frame->linesize[0] = ncv->rowstride;
ncv->details->frame->width = ncv->pixx; ncv->details->frame->width = ncv->pixx;