oiio: comment out unused vars in ncvisual_stream()

This commit is contained in:
nick black 2020-04-25 16:07:26 -04:00
parent ffbcb069a6
commit fd3df0a938
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -196,11 +196,11 @@ int ncvisual_stream(struct notcurses* nc, struct ncvisual* ncv, nc_err_e* ncerr,
ncv->timescale = timescale; ncv->timescale = timescale;
struct timespec begin; // time we started struct timespec begin; // time we started
clock_gettime(CLOCK_MONOTONIC, &begin); clock_gettime(CLOCK_MONOTONIC, &begin);
uint64_t nsbegin = timespec_to_ns(&begin); //uint64_t nsbegin = timespec_to_ns(&begin);
bool usets = false; //bool usets = false;
// each frame has a pkt_duration in milliseconds. keep the aggregate, in case // each frame has a pkt_duration in milliseconds. keep the aggregate, in case
// we don't have PTS available. // we don't have PTS available.
uint64_t sum_duration = 0; //uint64_t sum_duration = 0;
while((*ncerr = 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 /* codecctx seems to be off by a factor of 2 regularly. instead, go with
// the time_base from the avformatctx. // the time_base from the avformatctx.
@ -221,9 +221,9 @@ int ncvisual_stream(struct notcurses* nc, struct ncvisual* ncv, nc_err_e* ncerr,
++frame; ++frame;
struct timespec now; struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now); clock_gettime(CLOCK_MONOTONIC, &now);
uint64_t nsnow = timespec_to_ns(&now); /*uint64_t nsnow = timespec_to_ns(&now);
struct timespec interval; struct timespec interval;
/*uint64_t duration = ncv->oframe->pkt_duration * tbase * NANOSECS_IN_SEC; uint64_t duration = ncv->oframe->pkt_duration * tbase * NANOSECS_IN_SEC;
sum_duration += (duration * ncv->timescale); sum_duration += (duration * ncv->timescale);
//fprintf(stderr, "use: %u dur: %ju ts: %ju cctx: %f fctx: %f\n", usets, duration, ts, av_q2d(ncv->codecctx->time_base), av_q2d(ncv->fmtctx->streams[ncv->stream_index]->time_base)); //fprintf(stderr, "use: %u dur: %ju ts: %ju cctx: %f fctx: %f\n", usets, duration, ts, av_q2d(ncv->codecctx->time_base), av_q2d(ncv->fmtctx->streams[ncv->stream_index]->time_base));
double schedns = nsbegin; double schedns = nsbegin;