[vlc-commits] demux: ts: set bluray stream priority (fix #20284)
Francois Cartegnie
git at videolan.org
Tue May 22 15:01:18 CEST 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 22 12:07:56 2018 +0200| [ec5097162c956275eff4b5a73630c6de3427496b] | committer: Jean-Baptiste Kempf
demux: ts: set bluray stream priority (fix #20284)
(cherry picked from commit e7bb295f02c5cea30dbbe7e398f5c3c08fddc586)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=ec5097162c956275eff4b5a73630c6de3427496b
---
modules/demux/mpeg/ts_psi.c | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c
index 4e08c8b971..5706131152 100644
--- a/modules/demux/mpeg/ts_psi.c
+++ b/modules/demux/mpeg/ts_psi.c
@@ -1584,11 +1584,31 @@ static void FillPESFromDvbpsiES( demux_t *p_demux,
PMTEsHasRegistration( p_demux, p_dvbpsies, "HDMV" ) )
p_pes->p_es->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
- /* Disable dolbyvision */
- if ( registration_type == TS_PMT_REGISTRATION_BLURAY &&
- p_dvbpsies->i_pid == 0x1015 &&
- PMTEsHasRegistration( p_demux, p_dvbpsies, "HDMV" ) )
- p_pes->p_es->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
+ if ( registration_type == TS_PMT_REGISTRATION_BLURAY )
+ {
+ /*
+ * 0x1011 primary video
+ * 0x1100- 0x111f primary audio
+ * 0x1a00- 0x1a1f secondary audio
+ * 0x1b00- 0x1b1f secondary video */
+
+ /* Disable dolbyvision */
+ if ( p_dvbpsies->i_pid == 0x1015 &&
+ PMTEsHasRegistration( p_demux, p_dvbpsies, "HDMV" ) )
+ {
+ p_pes->p_es->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
+ }
+ else if( p_dvbpsies->i_pid > 0x19ff )
+ {
+ /* We might just want to prio, but it will trigger multiple videos es */
+ p_pes->p_es->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
+ }
+ else
+ {
+ p_pes->p_es->fmt.i_priority = 0xFFFF - (p_dvbpsies->i_pid & 0xFFFF) +
+ ES_PRIORITY_SELECTABLE_MIN;
+ }
+ }
/* PES packets usually contain truncated frames */
p_pes->p_es->fmt.b_packetized = false;
More information about the vlc-commits
mailing list