[ncvisual_simple_streamer] render *after* extracting subtitle

This commit is contained in:
nick black 2021-11-17 08:39:10 -05:00
parent 16325f0446
commit a0d37d442f
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -1170,9 +1170,6 @@ void ncvisual_destroy(ncvisual* ncv){
int ncvisual_simple_streamer(ncvisual* ncv, struct ncvisual_options* vopts,
const struct timespec* tspec, void* curry){
if(notcurses_render(ncplane_notcurses(vopts->n))){
return -1;
}
struct ncplane* subtitle = NULL;
int ret = 0;
if(curry){
@ -1184,6 +1181,9 @@ int ncvisual_simple_streamer(ncvisual* ncv, struct ncvisual_options* vopts,
}
subtitle = ncvisual_subtitle_plane(subncp, ncv);
}
if(notcurses_render(ncplane_notcurses(vopts->n))){
return -1;
}
clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, tspec, NULL);
ncplane_destroy(subtitle);
return ret;