[x264-devel] Fix memory leak when using select_every filter

Anton Mitrofanov git at videolan.org
Tue Aug 26 18:23:10 CEST 2014


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Thu Jul 31 16:17:32 2014 +0400| [95beb822e61a8d84dba9743f4b20b4c303f26798] | committer: Fiona Glaser

Fix memory leak when using select_every filter

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=95beb822e61a8d84dba9743f4b20b4c303f26798
---

 filters/video/select_every.c |    2 +-
 input/thread.c               |    4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/filters/video/select_every.c b/filters/video/select_every.c
index 38492bf..38a3e9b 100644
--- a/filters/video/select_every.c
+++ b/filters/video/select_every.c
@@ -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 )
diff --git a/input/thread.c b/input/thread.c
index be6302c..d840c9c 100644
--- a/input/thread.c
+++ b/input/thread.c
@@ -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 )
     {



More information about the x264-devel mailing list