mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
ncvisual: free up image alloc #241
This commit is contained in:
parent
9fdee8f672
commit
bc1f9bfb43
@ -19,7 +19,7 @@ void ncvisual_destroy(ncvisual* ncv){
|
||||
avcodec_close(ncv->codecctx);
|
||||
avcodec_free_context(&ncv->codecctx);
|
||||
av_frame_free(&ncv->frame);
|
||||
// av_frame_free(&ncv->oframe); FIXME
|
||||
// av_frame_unref(ncv->oframe); FIXME
|
||||
avcodec_parameters_free(&ncv->cparams);
|
||||
sws_freeContext(ncv->swsctx);
|
||||
av_packet_free(&ncv->packet);
|
||||
@ -370,6 +370,8 @@ int ncvisual_render(const ncvisual* ncv, int begy, int begx, int leny, int lenx)
|
||||
}
|
||||
}
|
||||
}
|
||||
av_freep(&ncv->oframe->data[0]);
|
||||
//av_frame_unref(ncv->oframe);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -47,9 +47,6 @@ int perframe(struct notcurses* nc, struct ncvisual* ncv, void* vframecount){
|
||||
ns -= s * NANOSECS_IN_SEC;
|
||||
ncplane_printf_aligned(stdn, 0, NCALIGN_RIGHT, "%02ld:%02ld:%02ld.%04ld",
|
||||
h, m, s, ns / 1000000);
|
||||
if(ncvisual_render(ncv, 0, 0, 0, 0)){
|
||||
return -1;
|
||||
}
|
||||
if(notcurses_render(nc)){
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user