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

Francois Cartegnie git at videolan.org
Thu Apr 12 16:58:38 CEST 2018


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

access: bluray: send proper EOS for HEVC

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

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

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 1495c3805a..b72b0f3968 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 *);
@@ -2135,11 +2139,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