/* $Id: encxvid.c,v 1.10 2005/03/09 23:28:39 titer Exp $
This file is part of the HandBrake source code.
- Homepage: <http://handbrake.m0k.org/>.
+ Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
hb_log( "encxvid: closing libxvidcore" );
xvid_encore( pv->xvid, XVID_ENC_DESTROY, NULL, NULL);
}
-
+
free( pv );
w->private_data = NULL;
}
xvid_enc_frame_t frame;
hb_buffer_t * in = *buf_in, * buf;
- /* If this is the last empty frame, we're done */
- if(!in->data)
+ if ( in->size <= 0 )
{
- *buf_out = NULL;
+ /* EOF on input - send it downstream & say we're done */
+ *buf_out = in;
+ *buf_in = NULL;
return HB_WORK_DONE;
}
buf = hb_buffer_init( 3 * job->width * job->height / 2 );
buf->start = in->start;
buf->stop = in->stop;
- //buf->chap = in->chap;
memset( &frame, 0, sizeof( frame ) );