From 453ab266d355c882ad2192f6907793e0154018b1 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Mon, 28 Oct 2013 17:48:15 +0000 Subject: libhb: fix "missing start code" error message when encoding BD CC subtitles which are embedded in the video stream have an id of 0 assigned. We should ignore these when setting up the PID filter list since they do not use an independent PID. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5860 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/stream.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libhb') diff --git a/libhb/stream.c b/libhb/stream.c index 8aabdff2c..6541e249a 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -959,10 +959,16 @@ hb_stream_t * hb_bd_stream_open( hb_title_t *title ) hb_subtitle_t * subtitle; for ( ii = 0; ( subtitle = hb_list_item( title->list_subtitle, ii ) ); ++ii ) { - pid = subtitle->id & 0xFFFF; - stream_type = subtitle->stream_type; + // If the subtitle track is CC embedded in the video stream, then + // it does not have an independent pid. In this case, we assigned + // the subtitle->id to 0. + if (subtitle->id != 0) + { + pid = subtitle->id & 0xFFFF; + stream_type = subtitle->stream_type; - update_ts_streams( d, pid, 0, stream_type, S, NULL ); + update_ts_streams( d, pid, 0, stream_type, S, NULL ); + } } // We don't need to wait for a PCR when scanning. In fact, it -- cgit v1.2.3