]> git.sesse.net Git - x264/commitdiff
Fix memory leak when using select_every filter
authorAnton Mitrofanov <BugMaster@narod.ru>
Thu, 31 Jul 2014 12:17:32 +0000 (16:17 +0400)
committerFiona Glaser <fiona@x264.com>
Tue, 26 Aug 2014 16:19:17 +0000 (09:19 -0700)
filters/video/select_every.c
input/thread.c

index 38492bf752e13896fc8f98ed7aa01de24d37b462..38a3e9b4b3c11dfd23a3b65c461877217980bf92 100644 (file)
@@ -51,7 +51,7 @@ static void help( int longhelp )
     printf( "            apply a selection pattern to input frames\n"
             "            step: the number of frames in the pattern\n"
             "            offsets: the offset into the step to select a frame\n"
-            "            see: http://avisynth.org/mediawiki/Select#SelectEvery\n" );
+            "            see: http://avisynth.nl/index.php/Select#SelectEvery\n" );
 }
 
 static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *info, x264_param_t *param, char *opt_string )
index be6302cab0175b0697a884a24065d2de72d8e8ca..d840c9c3179803db49cc70af0ec95838fad89d49 100644 (file)
@@ -88,7 +88,11 @@ static int read_frame( cli_pic_t *p_pic, hnd_t handle, int i_frame )
     if( h->next_frame == i_frame )
         XCHG( cli_pic_t, *p_pic, h->pic );
     else
+    {
+        if( h->next_frame >= 0 )
+            thread_input.release_frame( &h->pic, handle );
         ret |= h->input.read_frame( p_pic, h->p_handle, i_frame );
+    }
 
     if( !h->frame_total || i_frame+1 < h->frame_total )
     {