+ // Reuse the last frame
+ mlt_log_verbose( &m_consumer, "dropped video frame %u\n", ++m_dropped );
+ }
+
+ // Get the video
+ mlt_image_format format = mlt_image_yuv422;
+ uint8_t* image = 0;
+ uint8_t* buffer = 0;
+ if ( !mlt_frame_get_image( m_frame, &image, &format, &m_width, &m_height, 0 ) )
+ {
+ m_videoFrame = (IDeckLinkMutableVideoFrame*) mlt_deque_pop_back( m_videoFrameQ );
+ m_videoFrame->GetBytes( (void**) &buffer );
+ if ( m_displayMode->GetFieldDominance() == bmdUpperFieldFirst )
+ // convert lower field first to top field first
+ swab( image, buffer + m_width * 2, m_width * ( m_height - 1 ) * 2 );
+ else
+ swab( image, buffer, m_width * m_height * 2 );
+ m_deckLinkOutput->ScheduleVideoFrame( m_videoFrame, m_count * m_duration, m_duration, m_timescale );
+ mlt_deque_push_front( m_videoFrameQ, m_videoFrame );