OSDN Git Service
(root)
/
handbrake-jp
/
handbrake-jp-git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WinGui:
[handbrake-jp/handbrake-jp-git.git]
/
libhb
/
encvobsub.c
diff --git
a/libhb/encvobsub.c
b/libhb/encvobsub.c
index
e04fcd4
..
20a9879
100644
(file)
--- a/
libhb/encvobsub.c
+++ b/
libhb/encvobsub.c
@@
-26,9
+26,15
@@
int encsubInit( hb_work_object_t * w, hb_job_t * job )
int encsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
hb_buffer_t ** buf_out )
{
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;
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 */
if ( in->size <= 0 )
{
/* EOF on input stream - send it downstream & say that we're done */
@@
-38,10
+44,14
@@
int encsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
}
/*
}
/*
- * 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;
}
return HB_WORK_OK;
}
@@
-51,9
+61,9
@@
void encsubClose( hb_work_object_t * w )
free( w->private_data );
}
free( w->private_data );
}
-hb_work_object_t hb_encsub =
+hb_work_object_t hb_enc
vob
sub =
{
{
- WORK_ENCSUB,
+ WORK_ENC
VOB
SUB,
"VOBSUB encoder",
encsubInit,
encsubWork,
"VOBSUB encoder",
encsubInit,
encsubWork,