ncplayer: show correct blitter string #1336

pull/1338/head
nick black 4 years ago
parent cff8767de7
commit 8b3c0478c5
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -399,6 +399,12 @@ int ffmpeg_stream(notcurses* nc, ncvisual* ncv, float timescale,
if(activevopts.n){ if(activevopts.n){
ncplane_erase(activevopts.n); // new frame could be partially transparent ncplane_erase(activevopts.n); // new frame could be partially transparent
} }
// decay the blitter explicitly, so that the callback knows the blitter it
// was actually rendered with
auto bset = rgba_blitter(nc, &activevopts);
if(bset){
activevopts.blitter = bset->geom;
}
if((newn = ncvisual_render(nc, ncv, &activevopts)) == NULL){ if((newn = ncvisual_render(nc, ncv, &activevopts)) == NULL){
if(activevopts.n != vopts->n){ if(activevopts.n != vopts->n){
ncplane_destroy(activevopts.n); ncplane_destroy(activevopts.n);

@ -191,6 +191,12 @@ auto oiio_stream(notcurses* nc, ncvisual* ncv, float timescale,
memcpy(&activevopts, vopts, sizeof(*vopts)); memcpy(&activevopts, vopts, sizeof(*vopts));
int ncerr; int ncerr;
do{ do{
// decay the blitter explicitly, so that the callback knows the blitter it
// was actually rendered with
auto bset = rgba_blitter(nc, &activevopts);
if(bset){
activevopts.blitter = bset->geom;
}
if((newn = ncvisual_render(nc, ncv, &activevopts)) == NULL){ if((newn = ncvisual_render(nc, ncv, &activevopts)) == NULL){
if(activevopts.n != vopts->n){ if(activevopts.n != vopts->n){
ncplane_destroy(activevopts.n); ncplane_destroy(activevopts.n);

@ -66,7 +66,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
} }
if(!marsh->quiet){ if(!marsh->quiet){
stdn->printf(0, NCAlign::Left, "frame %06d\u2026 (%s)", marsh->framecount, stdn->printf(0, NCAlign::Left, "frame %06d\u2026 (%s)", marsh->framecount,
notcurses_str_blitter(marsh->blitter)); notcurses_str_blitter(vopts->blitter));
} }
char* subtitle = ncvisual_subtitle(ncv); char* subtitle = ncvisual_subtitle(ncv);
if(subtitle){ if(subtitle){

Loading…
Cancel
Save