From: j-b-m Date: Thu, 13 Nov 2008 23:24:08 +0000 (+0000) Subject: filter_freeze.c: fix detection of current frame position in a playlist X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=41f6e58e5da99fe48fd9454a675a53e5fca8292a;p=melted filter_freeze.c: fix detection of current frame position in a playlist git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1238 d19143bc-622f-0410-bfdd-b5b2a6649095 --- 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 );