Minor fixes
[melted] / src / modules / avformat / producer_avformat.c
index bd6927a..2d2e11b 100644 (file)
@@ -679,11 +679,12 @@ static void producer_set_up_video( mlt_producer this, mlt_frame frame )
                if ( codec != NULL )
                {
                        double source_fps = 0;
+                       int norm_aspect_ratio = mlt_properties_get_int( properties, "norm_aspect_ratio" );
 
                        // XXX: We won't know the real aspect ratio until an image is decoded
                        // but we do need it now (to satisfy filter_resize) - take a guess based
                        // on pal/ntsc
-                       if ( codec_context->sample_aspect_ratio.num > 0 )
+                       if ( !norm_aspect_ratio && codec_context->sample_aspect_ratio.num > 0 )
                        {
                                mlt_properties_set_double( properties, "aspect_ratio", av_q2d( codec_context->sample_aspect_ratio ) );
                        }
@@ -1001,7 +1002,7 @@ static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index
        mlt_frame_set_position( *frame, mlt_producer_position( this ) );
 
        // Set the position of this producer
-       mlt_properties_set_position( mlt_frame_properties( *frame ), "avformat_position", mlt_producer_position( this ) );
+       mlt_properties_set_position( mlt_frame_properties( *frame ), "avformat_position", mlt_producer_frame( this ) );
 
        // Set up the video
        producer_set_up_video( this, *frame );