]> git.sesse.net Git - mlt/commitdiff
Fix regression frames out-of-order.
authorDan Dennedy <dan@dennedy.org>
Wed, 16 Jun 2010 02:12:57 +0000 (19:12 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 24 Jan 2011 02:09:43 +0000 (18:09 -0800)
src/framework/mlt_consumer.c

index dbb264768460fbb2a98480f569fd219adbabe7fc..41a103086f00e191684b1ad8ed516621e03ff821 100644 (file)
@@ -1198,7 +1198,7 @@ mlt_frame mlt_consumer_rt_frame( mlt_consumer this )
                // Try to get frame from the done queue
                mlt_log_debug( MLT_CONSUMER_SERVICE(this), "size %d done count %d work count %d\n",
                        size, mlt_deque_count( this->done_queue ), mlt_deque_count( this->frame_queue ) );
-               if ( this->real_time > 0 && mlt_deque_count( this->done_queue ) <= 0 )
+               if ( this->real_time > 0 && size == this->real_time && mlt_deque_count( this->done_queue ) <= size )
                {
                        // Non-realtime and no ready frames
                        frame = mlt_consumer_get_frame( this );
@@ -1223,7 +1223,7 @@ mlt_frame mlt_consumer_rt_frame( mlt_consumer this )
 
                        // Get the frame from the done queue
                        pthread_mutex_lock( &this->done_queue_mutex );
-                       while( this->ahead && mlt_deque_count( this->done_queue ) <= 0 )
+                       while( this->ahead && mlt_deque_count( this->done_queue ) <= size )
                                pthread_cond_wait( &this->done_queue_cond, &this->done_queue_mutex );
                        frame = mlt_deque_pop_front( this->done_queue );
                        pthread_mutex_unlock( &this->done_queue_mutex );