/* $Id: decsub.c,v 1.12 2005/04/14 17:37:54 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_work_private_t * pv = w->private_data;
hb_buffer_t * in = *buf_in;
-
int size_sub, size_rle;
+ if ( in->size <= 0 )
+ {
+ /* EOF on input stream - send it downstream & say that we're done */
+ *buf_out = in;
+ *buf_in = NULL;
+ return HB_WORK_DONE;
+ }
+
pv->stream_id = in->id;
size_sub = ( in->data[0] << 8 ) | in->data[1];