[SCM] libav/wheezy-security: bytestream: add functions for accessing size of buffer

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 1 21:36:13 UTC 2014


The following commit has been merged in the wheezy-security branch:
commit b473fdcde329dfbe6d099247f65f51436a49e8c6
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
    (cherry picked from commit de9d2705f61ef569487ec5f8974a9c7ce34ec783)

diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h
index 6814620..091cab8 100644
--- a/libavcodec/bytestream.h
+++ b/libavcodec/bytestream.h
@@ -198,6 +198,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