[vlc-commits] demux: ts: fix bluray still frame output regression

Francois Cartegnie git at videolan.org
Fri Jan 12 10:35:53 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan 10 19:16:06 2018 +0100| [22ba392e22decf4775bb23734de06944e9b33c4e] | committer: Francois Cartegnie

demux: ts: fix bluray still frame output regression

(cherry picked from commit c25d7334fc9e08890a045dbf7b00fd3a6090f0ae)

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

 modules/access/bluray.c | 5 ++++-
 modules/demux/mpeg/ts.c | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 082fefae25..e7ceaa106c 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -2076,7 +2076,10 @@ static void streamFlush( demux_sys_t *p_sys )
         0x00, 0x00, 0x00, 0x00,                /* TP extra header (ATC) */
         0x47, 0x50, 0x11, 0x30,                /* TP header */
         (192 - (4 + 5) - sizeof(seq_end_pes)), /* adaptation field length */
-        0x80,                                  /* adaptation field: discontinuity indicator */
+        0x82,                                  /* af: discontinuity indicator + priv data */
+        0x0E,                                  /* priv data size */
+         'V',  'L',  'C',  '_',
+         'S',  'T',  'I',  'L',  'L',  'F',  'R',  'A',  'M',  'E',
     };
 
     memset(p_block->p_buffer, 0, 192);
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index e427059c92..9248e8ecb4 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2447,6 +2447,10 @@ static block_t * ProcessTSPacket( demux_t *p_demux, ts_pid_t *pid, block_t *p_pk
                             pid->i_pid );
                 /* ignore, that's not that simple 2.4.3.5 */
                 //p_pkt->i_flags |= BLOCK_FLAG_DISCONTINUITY;
+
+                /* ... or don't ignore for our Bluray still frames hack */
+                if(p[5] == 0x82 && !strncmp((const char *)&p[7], "VLC_STILLFRAME", 14))
+                    p_pkt->i_flags |= BLOCK_FLAG_DISCONTINUITY;
             }
 #if 0
             if( p[5]&0x40 )



More information about the vlc-commits mailing list