and fix a couple potential leaks if the timing is just right in work loops
git-svn-id: svn://localhost/HandBrake/trunk@3016
b64f7644-9d1e-0410-96f1-
a4d463321fa5
void decsubClose( hb_work_object_t * w )
{
+ hb_work_private_t * pv = w->private_data;
+
+ if ( pv->buf )
+ hb_buffer_close( &pv->buf );
free( w->private_data );
}
* When forcing subtitles, ignore all those that don't
* have the forced flag set.
*/
+ hb_buffer_close( &pv->buf );
return NULL;
}
if ( buf_in == NULL )
continue;
if ( *job->die )
+ {
+ if( buf_in )
+ {
+ hb_buffer_close( &buf_in );
+ }
break;
+ }
w->status = w->work( w, &buf_in, NULL );
}
if ( buf_in == NULL )
continue;
if ( *job->die )
+ {
+ if( buf_in )
+ {
+ hb_buffer_close( &buf_in );
+ }
break;
+ }
w->status = w->work( w, &buf_in, &buf_out );
if ( buf_in == NULL )
continue;
if ( *w->done )
+ {
+ if( buf_in )
+ {
+ hb_buffer_close( &buf_in );
+ }
break;
+ }
w->status = w->work( w, &buf_in, &buf_out );