[vlc-commits] [Git][videolan/vlc][master] demux: ts: use private flag for packet loss instead of discontinuity
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Feb 3 13:36:29 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a2e80470 by François Cartegnie at 2024-02-03T10:56:13+00:00
demux: ts: use private flag for packet loss instead of discontinuity
Simple packet loss is not a real discontinuity.
It is also up to the aggregation layer to deal with the effects
- - - - -
3 changed files:
- modules/demux/mpeg/ts.c
- modules/demux/mpeg/ts_pes.c
- modules/demux/mpeg/ts_pes.h
Changes:
=====================================
modules/demux/mpeg/ts.c
=====================================
@@ -2661,7 +2661,7 @@ static block_t * ProcessTSPacket( demux_t *p_demux, ts_pid_t *pid, block_t *p_pk
pid->i_cc = i_cc;
pid->i_dup = 0;
- p_pkt->i_flags |= BLOCK_FLAG_DISCONTINUITY;
+ p_pkt->i_flags |= BLOCK_FLAG_PRIVATE_PACKET_LOSS;
}
else pid->i_cc = i_cc;
}
=====================================
modules/demux/mpeg/ts_pes.c
=====================================
@@ -172,6 +172,15 @@ bool ts_pes_Gather( ts_pes_parse_callback *cb,
}
+ /* Deal with explicit packet loss */
+ if( p_pkt->i_flags & BLOCK_FLAG_PRIVATE_PACKET_LOSS )
+ {
+ /* Flag unfinished unit as corrupted */
+ if ( p_pes->gather.i_gathered )
+ p_pes->gather.i_block_flags |= BLOCK_FLAG_CORRUPTED;
+ p_pkt->i_flags &= ~BLOCK_FLAG_PRIVATE_PACKET_LOSS;
+ }
+
/* We'll cannot parse any pes data */
if( (p_pkt->i_flags & BLOCK_FLAG_SCRAMBLED) && b_valid_scrambling )
{
=====================================
modules/demux/mpeg/ts_pes.h
=====================================
@@ -21,6 +21,7 @@
#define VLC_TS_PES_H
#define BLOCK_FLAG_PRIVATE_SOURCE_RANDOM_ACCESS (1 << BLOCK_FLAG_PRIVATE_SHIFT)
+#define BLOCK_FLAG_PRIVATE_PACKET_LOSS (2 << BLOCK_FLAG_PRIVATE_SHIFT)
#define TS_PES_HEADER_SIZE 6
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a2e804702885d668fcfeefabcd0f6aecdff7fb27
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a2e804702885d668fcfeefabcd0f6aecdff7fb27
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list