ncvisual_stream: fix up ncerr assignment

This commit is contained in:
nick black 2020-04-24 03:58:31 -04:00 committed by Nick Black
parent 5f42e06383
commit 1d66f89032
2 changed files with 1 additions and 2 deletions

View File

@ -108,7 +108,6 @@ int xray_demo(struct notcurses* nc){
char* path = find_data("notcursesI.avi");
nc_err_e err;
struct ncvisual* ncv = ncplane_visual_open(n, path, &err);
fprintf(stderr, "NCV: %p %s\n", ncv, path);
free(path);
if(ncv == NULL){
return -1;

View File

@ -459,7 +459,7 @@ int ncvisual_stream(notcurses* nc, ncvisual* ncv, nc_err_e* ncerr,
// each frame has a pkt_duration in milliseconds. keep the aggregate, in case
// we don't have PTS available.
uint64_t sum_duration = 0;
while(ncvisual_decode(ncv) == NCERR_SUCCESS){
while((*ncerr = ncvisual_decode(ncv)) == NCERR_SUCCESS){
// codecctx seems to be off by a factor of 2 regularly. instead, go with
// the time_base from the avformatctx.
double tbase = av_q2d(ncv->fmtctx->streams[ncv->stream_index]->time_base);