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

Francois Cartegnie git at videolan.org
Fri Jan 12 10:34:42 CET 2018


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

demux: ts: fix bluray still frame output regression

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

 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 478bb5ae78..07bf64a676 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -2097,7 +2097,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 3e33380937..f36bdce077 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2458,6 +2458,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