summaryrefslogtreecommitdiffstats
path: root/libhb/muxmp4.c
diff options
context:
space:
mode:
authoreddyg <[email protected]>2009-05-06 02:25:58 +0000
committereddyg <[email protected]>2009-05-06 02:25:58 +0000
commit6add7d899f49abbe2b6cc0702296941e948f5ef5 (patch)
tree386ec27521bf5b11a54065869dd8b0ea3220ad76 /libhb/muxmp4.c
parent046f366e1f748130ae00c8a214b100492a50a394 (diff)
Push an EOF onto the subtitle fifos from the reader for DVD VOBSUBs and also from cc608 for closed captions
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2388 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-rw-r--r--libhb/muxmp4.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index bdeea8c42..6795a33ec 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -598,15 +598,25 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
while( ( sub = hb_fifo_see( subtitle->fifo_out )) != NULL )
{
- if (sub->start < buf->start ) {
+ if( sub->size == 0 )
+ {
+ /*
+ * EOF
+ */
+ hb_log("MuxMP4: Text Sub: EOF");
sub = hb_fifo_get( subtitle->fifo_out );
- hb_log("MuxMP4: Text Sub:%lld: %s", sub->start, sub->data);
hb_buffer_close( &sub );
} else {
- /*
- * Not time yet
- */
- break;
+ if( sub->start < buf->start ) {
+ sub = hb_fifo_get( subtitle->fifo_out );
+ hb_log("MuxMP4: Text Sub:%lld: %s", sub->start, sub->data);
+ hb_buffer_close( &sub );
+ } else {
+ /*
+ * Not time yet
+ */
+ break;
+ }
}
}
}