ncplayer: show correct blitter string #1336

This commit is contained in:
nick black 2021-02-07 22:44:46 -05:00
parent cff8767de7
commit 8b3c0478c5
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
3 changed files with 13 additions and 1 deletions

View File

@ -399,6 +399,12 @@ int ffmpeg_stream(notcurses* nc, ncvisual* ncv, float timescale,
if(activevopts.n){
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(activevopts.n != vopts->n){
ncplane_destroy(activevopts.n);

View File

@ -191,6 +191,12 @@ auto oiio_stream(notcurses* nc, ncvisual* ncv, float timescale,
memcpy(&activevopts, vopts, sizeof(*vopts));
int ncerr;
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(activevopts.n != vopts->n){
ncplane_destroy(activevopts.n);

View File

@ -66,7 +66,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
}
if(!marsh->quiet){
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);
if(subtitle){