From dd5136256aa5db8b46a6e1a52a0ceacb440c61ea Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 27 Mar 2021 11:32:33 -0400 Subject: [PATCH] [ffmpeg] don't erase() in stream() --- src/media/ffmpeg.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/media/ffmpeg.cpp b/src/media/ffmpeg.cpp index ce8f02ff3..3b74a896f 100644 --- a/src/media/ffmpeg.cpp +++ b/src/media/ffmpeg.cpp @@ -394,13 +394,6 @@ int ffmpeg_stream(notcurses* nc, ncvisual* ncv, float timescale, // all media when we loop =[. we seem to be accurate enough now with the // tbase/ppd. see https://github.com/dankamongmen/notcurses/issues/1352. double tbase = av_q2d(ncv->details->fmtctx->streams[ncv->details->stream_index]->time_base); - /*int64_t ts = ncv->details->frame->best_effort_timestamp; - if(frame == 1 && ts){ - usets = true; - }*/ - 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); @@ -419,15 +412,8 @@ int ffmpeg_stream(notcurses* nc, ncvisual* ncv, float timescale, ++frame; uint64_t duration = ncv->details->frame->pkt_duration * tbase * NANOSECS_IN_SEC; double schedns = nsbegin; - /*if(usets){ - if(tbase == 0){ - tbase = duration; - } - schedns += ts * (tbase * timescale) * NANOSECS_IN_SEC; - }else{*/ - sum_duration += (duration * timescale); - schedns += sum_duration; - //} + sum_duration += (duration * timescale); + schedns += sum_duration; struct timespec abstime; ns_to_timespec(schedns, &abstime); int r;