]> git.sesse.net Git - mlt/commitdiff
add ability to ignore field order as used by sdl consumer
authorDan Dennedy <dan@dennedy.org>
Fri, 14 Sep 2012 04:52:02 +0000 (21:52 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 14 Sep 2012 04:52:02 +0000 (21:52 -0700)
src/framework/mlt_consumer.h
src/modules/core/filter_fieldorder.c
src/modules/sdl/consumer_sdl.c

index b0b48e9cad354f4331c3ed882bc63ee1054f67d9..3e7bb033975226bfc43e320517bee7770766c7ba 100644 (file)
@@ -67,7 +67,8 @@
  * \properties \em display_aspect_num the numerator of the video frame aspect ratio, overrides \p mlt_profile_s
  * \properties \em display_aspect_den the denominator of the video frame aspect ratio, overrides \p mlt_profile_s
  * \properties \em priority the OS scheduling priority for the render threads when real_time is not 0.
- * \properties \em top_field_first when not progressive, whether interlace field order is top-field-first, defaults to 0
+ * \properties \em top_field_first when not progressive, whether interlace field order is top-field-first, defaults to 0.
+ *   Set this to -1 if the consumer does not care about the field order.
  * \properties \em mlt_image_format the image format to request in rendering threads, defaults to yuv422
  * \properties \em mlt_audio_format the audio format to request in rendering threads, defaults to S16
  */
index 259981154f247f79c72faa8fe3164d3f9b80d932..79223757323d84cd9e10801aa1313a353f0b7285 100644 (file)
@@ -74,7 +74,8 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format
                }
 
                // Correct field order if needed
-               if ( mlt_properties_get_int( properties, "top_field_first" ) != tff &&
+               if ( tff != -1 &&
+                    mlt_properties_get_int( properties, "top_field_first" ) != tff &&
                     mlt_properties_get( properties, "progressive" ) &&
                     mlt_properties_get_int( properties, "progressive" ) == 0 )
                {
index 0ed6e09db8010b89b04c0374fe11a45236040344..3f92a3094ce105038460210a0952ca68fc6f2c1f 100644 (file)
@@ -125,6 +125,7 @@ mlt_consumer consumer_sdl_init( mlt_profile profile, mlt_service_type type, cons
 
                // Tell render thread we prefer yuv420p
                mlt_properties_set( this->properties, "mlt_image_format", "yuv420p" );
+               mlt_properties_set_int( this->properties, "top_field_first", -1 );
 
                // Ensure we don't join on a non-running object
                this->joined = 1;