int encsubWork( 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 = *buf_in;
+ if (w->subtitle->source != VOBSUB)
+ {
+ // Invalid source, send EOF, this shouldn't ever happen
+ hb_log("encvobsub: invalid subtitle source");
+ hb_buffer_close( buf_in );
+ *buf_out = hb_buffer_init(0);
+ }
if ( in->size <= 0 )
{
/* EOF on input stream - send it downstream & say that we're done */
}
/*
- * Don't do anything at present, just pass the buffer on.
+ * Not much to do, just pass the buffer on.
+ * Some day, we may re-encode bd subtitles here ;)
*/
- *buf_out = in;
- *buf_in = NULL;
+ if (buf_out)
+ {
+ *buf_out = in;
+ *buf_in = NULL;
+ }
return HB_WORK_OK;
}
free( w->private_data );
}
-hb_work_object_t hb_encsub =
+hb_work_object_t hb_encvobsub =
{
- WORK_ENCSUB,
+ WORK_ENCVOBSUB,
"VOBSUB encoder",
encsubInit,
encsubWork,