X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=input%2Fthread.c;h=8e0514c7261d8463fcbd351231fdfd8955370186;hb=70c3ba42e610b4182edda4fdeb10b37a2a70eb8f;hp=7447489276023793de14ac08c258d893ad7569f6;hpb=27a7b05b8330d0756e5e3f6669282561030f54fa;p=x264 diff --git a/input/thread.c b/input/thread.c index 74474892..8e0514c7 100644 --- a/input/thread.c +++ b/input/thread.c @@ -1,7 +1,7 @@ /***************************************************************************** * thread.c: threaded input ***************************************************************************** - * Copyright (C) 2003-2012 x264 project + * Copyright (C) 2003-2015 x264 project * * Authors: Laurent Aimar * Loren Merritt @@ -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 ) {