X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fkdenlive%2Ffilter_freeze.c;h=ef85423d96608852c6ff5273d91799fdf01f2700;hb=f4d4669b66a9f23be85527f65dec19a566db561c;hp=c2864996cc0bac71be1a7640dfae86ca412d3c1e;hpb=b0ab3601abe8240c6c8f6e4c3c64ee3f57adc889;p=melted diff --git a/src/modules/kdenlive/filter_freeze.c b/src/modules/kdenlive/filter_freeze.c index c286499..ef85423 100644 --- a/src/modules/kdenlive/filter_freeze.c +++ b/src/modules/kdenlive/filter_freeze.c @@ -27,10 +27,6 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { // Get the image - - - mlt_position currentpos = mlt_frame_get_position( this ); - mlt_filter filter = mlt_frame_pop_service( this ); mlt_properties properties = MLT_FILTER_PROPERTIES( filter ); @@ -38,6 +34,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * int freeze_before = mlt_properties_get_int( properties, "freeze_before" ); int freeze_after = mlt_properties_get_int( properties, "freeze_after" ); mlt_position pos = mlt_properties_get_position( properties, "frame" ); + mlt_position currentpos = mlt_properties_get_position( properties, "_seek_frame" ); int do_freeze = 0; if (freeze_before == 0 && freeze_after == 0) { @@ -87,6 +84,9 @@ static mlt_frame filter_process( mlt_filter this, mlt_frame frame ) // Push the filter on to the stack mlt_frame_push_service( frame, this ); + // Determine the time position of this frame + mlt_properties_set_position( MLT_FILTER_PROPERTIES( this ), "_seek_frame", mlt_frame_get_position( frame ) - mlt_filter_get_in( this ) ); + // Push the frame filter mlt_frame_push_get_image( frame, filter_get_image );