[Kdenlive-devel] the missing frames - in consumer_sdl.c ---------> this->running = 0;

Al a_kirk at hughes.net
Thu Jan 14 02:46:51 UTC 2010


In other messages I've inquired about the 'flash' or missing frames at 
the end of clip/zone/project playback.  I've traced it to 
consumer_sdl.c.  this->running  is set to 0 BEFORE the last frames of a 
list have been displayed.  The slower the processor the more this is 
apparent. 

set breakpoint on 660 with the condition that this->running = 0
set a breakpoint on 793.

use this in renderer.cpp

static void consumer_frame_show(mlt_consumer, Render * self, mlt_frame 
frame_ptr)
{
    // detect if the producer has finished playing. Is there a better 
way to do it?
    if (self->m_isBlocked) return;
    Mlt::Frame frame(frame_ptr);
#ifdef Q_WS_MAC
    self->showFrame(frame);
#endif
    int i = mlt_frame_get_position(frame_ptr);
    self->emitFrameNumber(i);
    if (frame.get_double("_speed") == 0.0) {
        kDebug() << " AKAK stop: speed 0 pos: " <<  i;
        self->emitConsumerStopped();
    } else  if (frame.get_double("_speed") < 0.0 && i <= 0) {
        kDebug() << " AKAK stop: speed < 0 pos: "<<  i;
        self->pause();
        self->emitConsumerStopped();
    }  else kDebug() << " AKAK pos " <<  i;  // use this to see that the 
next-to-last frame or more is always dropped
}

you will see that 793 is hit and sets running=0 before the last of the 
queue is displayed, dumping the display loop out at line 515.
( I hope I got those line numbers right, it's been a long 22 hours....)
Al Kirk





More information about the Kdenlive mailing list