mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncvisual_stream(): fix oiio for eager decode #721
This commit is contained in:
parent
0be0b208de
commit
c286a8ae9b
@ -146,7 +146,7 @@ auto ncvisual_stream(notcurses* nc, ncvisual* ncv, nc_err_e* ncerr, float timesc
|
|||||||
ncplane* newn = nullptr;
|
ncplane* newn = nullptr;
|
||||||
ncvisual_options activevopts;
|
ncvisual_options activevopts;
|
||||||
memcpy(&activevopts, vopts, sizeof(*vopts));
|
memcpy(&activevopts, vopts, sizeof(*vopts));
|
||||||
while((*ncerr = ncvisual_decode(ncv)) == NCERR_SUCCESS){
|
do{
|
||||||
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);
|
||||||
@ -163,6 +163,8 @@ auto ncvisual_stream(notcurses* nc, ncvisual* ncv, nc_err_e* ncerr, float timesc
|
|||||||
int r;
|
int r;
|
||||||
if(streamer){
|
if(streamer){
|
||||||
r = streamer(ncv, &activevopts, &now, curry);
|
r = streamer(ncv, &activevopts, &now, curry);
|
||||||
|
}else{
|
||||||
|
r = ncvisual_simple_streamer(ncv, &activevopts, &now, curry);
|
||||||
}
|
}
|
||||||
if(r){
|
if(r){
|
||||||
if(activevopts.n != vopts->n){
|
if(activevopts.n != vopts->n){
|
||||||
@ -171,7 +173,7 @@ auto ncvisual_stream(notcurses* nc, ncvisual* ncv, nc_err_e* ncerr, float timesc
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
++frame;
|
++frame;
|
||||||
}
|
}while((*ncerr = ncvisual_decode(ncv)) == NCERR_SUCCESS);
|
||||||
if(activevopts.n != vopts->n){
|
if(activevopts.n != vopts->n){
|
||||||
ncplane_destroy(activevopts.n);
|
ncplane_destroy(activevopts.n);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user