/*****************************************************************************
* thread.c: threaded input
*****************************************************************************
- * Copyright (C) 2003-2012 x264 project
+ * Copyright (C) 2003-2015 x264 project
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Loren Merritt <lorenm@u.washington.edu>
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 )
{