[SCM] libav/experimental: bytestream: add functions for accessing size of buffer

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:02:48 UTC 2014


The following commit has been merged in the experimental branch:
commit de9d2705f61ef569487ec5f8974a9c7ce34ec783
Author: Paul B Mahol <onemda at gmail.com>
Date:   Wed Mar 21 00:10:18 2012 +0000

    bytestream: add functions for accessing size of buffer
    
    Signed-off-by: Paul B Mahol <onemda at gmail.com>
    Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
    Signed-off-by: Justin Ruggles <justin.ruggles at gmail.com>
    
    CC:libav-stable at libav.org

diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h
index 0f89558..63d61f1 100644
--- a/libavcodec/bytestream.h
+++ b/libavcodec/bytestream.h
@@ -190,6 +190,16 @@ static av_always_inline int bytestream2_tell_p(PutByteContext *p)
     return (int)(p->buffer - p->buffer_start);
 }
 
+static av_always_inline int bytestream2_size(GetByteContext *g)
+{
+    return (int)(g->buffer_end - g->buffer_start);
+}
+
+static av_always_inline int bytestream2_size_p(PutByteContext *p)
+{
+    return (int)(p->buffer_end - p->buffer_start);
+}
+
 static av_always_inline int bytestream2_seek(GetByteContext *g,
                                              int offset,
                                              int whence)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list