X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fdecsub.c;h=98ffa1a0d7ad9008a951aa84604d9883431dcd7c;hb=eadad4f9ae3f2c929722ebd4474e1abeabc173c2;hp=ba5da0496bcc096301f181e141bd0391bc50c986;hpb=90fba27222b3467b91c29803f217c4d5335c7ad0;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/libhb/decsub.c b/libhb/decsub.c
index ba5da049..98ffa1a0 100644
--- a/libhb/decsub.c
+++ b/libhb/decsub.c
@@ -1,7 +1,7 @@
/* $Id: decsub.c,v 1.12 2005/04/14 17:37:54 titer Exp $
This file is part of the HandBrake source code.
- Homepage: .
+ Homepage: .
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
@@ -51,9 +51,16 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
{
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];