summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2013-10-28 22:13:12 +0000
committerjstebbins <[email protected]>2013-10-28 22:13:12 +0000
commitb703e087e610549eea00bf761fd9f6b438169b44 (patch)
tree5be9d28686d27c8bcd4e00c201e8ce41b3c18b4c
parent3196d3b95e504ba868b838ae55a2599ecfef147e (diff)
libhb: fix another case of spurious "missing start code" messages
I have a poorly mastered BD that does not pad the adaptation field of the PCR PID properly. Since these packets are only used to extract the PCR, we can drop them early before the code that would generate these error messages. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5862 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/stream.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 6541e249a..8a2e08dab 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -4908,6 +4908,17 @@ hb_buffer_t * hb_ts_decode_pkt( hb_stream_t *stream, const uint8_t * pkt )
}
}
+ if ( ts_stream_kind( stream, curstream ) == P )
+ {
+ // This is a stream that only contains PCRs. No need to process
+ // the remainder of the packet.
+ //
+ // I ran across a poorly mastered BD that does not properly pad
+ // the adaptation field and causes parsing errors below if we
+ // do not exit early here.
+ return NULL;
+ }
+
/* If we get here the packet is valid - process its data */