[libbluray-devel] Add bs_read_string()

hpi1 git at videolan.org
Tue Oct 28 09:25:56 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Oct 27 14:09:24 2014 +0200| [32bfd8b8078c36c571cb58cf68ba545808c2e286] | committer: hpi1

Add bs_read_string()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=32bfd8b8078c36c571cb58cf68ba545808c2e286
---

 src/util/bits.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/util/bits.h b/src/util/bits.h
index a75a3b5..581bb3b 100644
--- a/src/util/bits.h
+++ b/src/util/bits.h
@@ -119,6 +119,11 @@ static inline void bs_read_bytes( BITSTREAM *s, uint8_t *buf, int i_count )
         buf[ii] = bs_read(s, 8);
     }
 }
+static inline void bs_read_string( BITSTREAM *s, char *buf, int i_count )
+{
+    bs_read_bytes(s, (uint8_t*)buf, i_count);
+    buf[i_count] = '\0';
+}
 
 static inline uint32_t bb_show( BITBUFFER *bb, int i_count )
 {



More information about the libbluray-devel mailing list