summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/stream.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 2cdd4503d..c6242f829 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -4795,11 +4795,15 @@ hb_buffer_t * hb_ts_decode_pkt( hb_stream_t *stream, const uint8_t * pkt,
!ts_stream->skipbad &&
(continuity != ( (ts_stream->continuity + 1) & 0xf ) ) )
{
- ts_err( stream, curstream, "continuity error: got %d expected %d",
- (int)continuity,
- (ts_stream->continuity + 1) & 0xf );
+ if (continuity == ts_stream->continuity)
+ {
+ // Duplicate packet as defined by ITU-T Rec. H.222
+ // Drop the packet.
+ return hb_buffer_list_clear(&list);
+ }
+ ts_warn( stream, "continuity error: got %d expected %d",
+ (int)continuity, (ts_stream->continuity + 1) & 0xf );
ts_stream->continuity = continuity;
- return hb_buffer_list_clear(&list);
}
ts_stream->continuity = continuity;