Hardware Accelerators require access to the escaped bitstream.
---
 libavcodec/hevc.c | 6 ++++--
 libavcodec/hevc.h | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 4aea5f1..d58b460 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2657,8 +2657,8 @@ static int extract_rbsp(const uint8_t *src, int length,
 #endif /* HAVE_FAST_UNALIGNED */
 
     if (i >= length - 1) { // no escaped 0
-        nal->data = src;
-        nal->size = length;
+        nal->data = nal->raw_data = src;
+        nal->size = nal->raw_size = length;
         return length;
     }
 
@@ -2697,6 +2697,8 @@ nsc:
 
     nal->data = dst;
     nal->size = di;
+    nal->raw_data = src;
+    nal->raw_size = si;
     return si;
 }
 
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index 37131cd..c4162e7 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -692,6 +692,9 @@ typedef struct HEVCNAL {
 
     int size;
     const uint8_t *data;
+
+    int raw_size;
+    const uint8_t *raw_data;
 } HEVCNAL;
 
 struct HEVCContext;
-- 
1.9.5.msysgit.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to