[vlc-commits] demux: ts: set bluray stream priority (fix #20284)

Francois Cartegnie git at videolan.org
Tue May 22 13:49:14 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 22 12:07:56 2018 +0200| [e7bb295f02c5cea30dbbe7e398f5c3c08fddc586] | committer: Francois Cartegnie

demux: ts: set bluray stream priority (fix #20284)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7bb295f02c5cea30dbbe7e398f5c3c08fddc586
---

 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 0464454a61..17aefa2c4f 100644
--- a/modules/demux/mpeg/ts_psi.c
+++ b/modules/demux/mpeg/ts_psi.c
@@ -1605,11 +1605,31 @@ static void FillPESFromDvbpsiES( demux_t *p_demux,
 
     SetupStandardESDescriptors(  p_demux, p_pes->p_es, p_dvbpsies );
 
-    /* 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