]> git.sesse.net Git - mlt/commitdiff
Fix setting progressive property on repeated frames (kdenlive-1335).
authorDan Dennedy <dan@dennedy.org>
Mon, 11 Jan 2010 02:35:44 +0000 (18:35 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 11 Jan 2010 02:35:44 +0000 (18:35 -0800)
src/modules/avformat/producer_avformat.c
src/modules/xine/filter_deinterlace.c

index 1fc2d4b7743208b8295310abad1212898cf27e43..be7a8193400f8ab93ffe5010a482a54f7829f3bd 100644 (file)
@@ -1177,8 +1177,6 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                                        else
 #endif
                                        convert_image( this->av_frame, *buffer, codec_context->pix_fmt, format, *width, *height );
-                                       if ( !mlt_properties_get( properties, "force_progressive" ) )
-                                               mlt_properties_set_int( frame_properties, "progressive", !this->av_frame->interlaced_frame );
                                        this->top_field_first |= this->av_frame->top_field_first;
                                        this->current_position = int_position;
                                        this->got_picture = 1;
@@ -1200,6 +1198,10 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
 
        avformat_unlock();
 
+       // Set the progressive flag
+       mlt_properties_set_int( frame_properties, "progressive", 
+               !this->av_frame->interlaced_frame || !!mlt_properties_get_int( properties, "force_progressive" ) );
+
        // Set the field order property for this frame
        mlt_properties_set_int( frame_properties, "top_field_first", this->top_field_first );
 
@@ -1408,8 +1410,6 @@ static void producer_set_up_video( producer_avformat this, mlt_frame frame )
                mlt_properties_set_int( frame_properties, "real_width", this->video_codec->width );
                mlt_properties_set_int( frame_properties, "real_height", this->video_codec->height );
                mlt_properties_set_double( frame_properties, "aspect_ratio", aspect_ratio );
-               if ( mlt_properties_get( properties, "force_progressive" ) )
-                       mlt_properties_set_int( frame_properties, "progressive", mlt_properties_get_int( properties, "force_progressive" ) );
 
                // Add our image operation
                mlt_frame_push_service( frame, this );
index 840b5f072a8e877d2a3e2fed0f766f664690cf89..fef3301ff3f3cc95150839ea382c15aed03553b8 100644 (file)
@@ -46,10 +46,10 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
        // Get the input image
        if ( deinterlace && !progressive )
                *format = mlt_image_yuv422;
-       mlt_log_debug( MLT_FILTER_SERVICE( filter ), "xine.deinterlace %d prog %d format %s\n",
-               deinterlace, progressive, mlt_image_format_name( *format ) );
        error = mlt_frame_get_image( this, image, format, width, height, writable );
        progressive = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "progressive" );
+       mlt_log_debug( MLT_FILTER_SERVICE( filter ), "xine.deinterlace %d prog %d format %s\n",
+               deinterlace, progressive, mlt_image_format_name( *format ) );
 
        // Check that we want progressive and we aren't already progressive
        if ( deinterlace && *format == mlt_image_yuv422 && *image && !progressive )