[vlc-commits] access: bluray: send proper EOS for HEVC

Francois Cartegnie git at videolan.org
Tue Oct 30 18:12:18 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 12 15:12:47 2018 +0200| [ae469031f6dcf2daf89e63e971f22ed6ced7c1ed] | committer: Francois Cartegnie

access: bluray: send proper EOS for HEVC

(cherry picked from commit da4dce1b8d89a52eb9fcc7fdb67244e1637dfec6)

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

 modules/access/bluray.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index ed1e013bae..be6f2bccec 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -84,6 +84,10 @@ static const char *const ppsz_region_code_text[] = {
 # define BLURAY_DEMUX
 #endif
 
+#ifndef BD_STREAM_TYPE_VIDEO_HEVC
+# define BD_STREAM_TYPE_VIDEO_HEVC 0x24
+#endif
+
 /* Callbacks */
 static int  blurayOpen (vlc_object_t *);
 static void blurayClose(vlc_object_t *);
@@ -2105,11 +2109,15 @@ static void streamFlush( demux_sys_t *p_sys )
         case BLURAY_STREAM_TYPE_VIDEO_H264:
             i_eos = 0x0A; /* VC1 / H.264 sequence end */
             break;
+        case BD_STREAM_TYPE_VIDEO_HEVC:
+            i_eos = 0x48; /* HEVC sequence end NALU */
+            break;
     }
 
     uint8_t seq_end_pes[] = {
         0x00, 0x00, 0x01, 0xe0, 0x00, 0x07, 0x80, 0x00, 0x00,  /* PES header */
         0x00, 0x00, 0x01, i_eos,                               /* PES payload: sequence end */
+        0x00, /* 2nd byte for HEVC NAL, pads others */
     };
 
     writeTsPacketWDiscontinuity( p_block->p_buffer, 0x1011, seq_end_pes, sizeof(seq_end_pes) );



More information about the vlc-commits mailing list