field order normalisation fix, add .vob to fezzik, field order detection for avformat
[melted] / src / modules / avformat / producer_avformat.c
index 582171e..ed7694d 100644 (file)
@@ -469,7 +469,7 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                                                current_time = real_timecode;
 
                                        // Handle ignore
-                                       if ( current_time < real_timecode )
+                                       if ( ( int )( current_time * 100 ) < ( int )( real_timecode * 100 ) - 7 )
                                        {
                                                ignore = 0;
                                                got_picture = 0;
@@ -483,6 +483,7 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                                        {
                                                got_picture = 0;
                                        }
+                                       mlt_properties_set_int( properties, "top_field_first", frame.top_field_first );
                                }
                        }
 
@@ -571,6 +572,10 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                        }
                }
        }
+       
+       // Set the field order property for this frame
+       mlt_properties_set_int( frame_properties, "top_field_first", 
+               mlt_properties_get_int( properties, "top_field_first" ) );
 
        // Regardless of speed, we expect to get the next frame (cos we ain't too bright)
        mlt_properties_set_position( properties, "video_expected", position + 1 );