OSDN Git Service

BuildSystem:
[handbrake-jp/handbrake-jp-git.git] / libhb / declpcm.c
index 3220d3d..50a5a12 100644 (file)
@@ -133,14 +133,15 @@ static int declpcmWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
                  hb_buffer_t ** buf_out )
 {
     hb_work_private_t * pv = w->private_data;
-    hb_buffer_t *in;
+    hb_buffer_t *in = *buf_in;
     hb_buffer_t *buf = NULL;
 
-    /* need an input buffer to do anything */
-    if( ! buf_in || ! ( in = *buf_in ) )
+    if ( in->size <= 0 )
     {
-        *buf_out = buf;
-        return HB_WORK_OK;
+        /* EOF on input stream - send it downstream & say that we're done */
+        *buf_out = in;
+        *buf_in = NULL;
+        return HB_WORK_DONE;
     }
 
     pv->sequence = in->sequence;