diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/bytestream.h | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/bytestream.h')
| -rw-r--r-- | ffmpeg/libavcodec/bytestream.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg/libavcodec/bytestream.h b/ffmpeg/libavcodec/bytestream.h index af7f75b..f245859 100644 --- a/ffmpeg/libavcodec/bytestream.h +++ b/ffmpeg/libavcodec/bytestream.h @@ -26,6 +26,7 @@ #include <stdint.h> #include <string.h> +#include "libavutil/avassert.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" @@ -131,6 +132,7 @@ static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size) { + av_assert0(buf_size >= 0); g->buffer = buf; g->buffer_start = buf; g->buffer_end = buf + buf_size; @@ -140,6 +142,7 @@ static av_always_inline void bytestream2_init_writer(PutByteContext *p, uint8_t *buf, int buf_size) { + av_assert0(buf_size >= 0); p->buffer = buf; p->buffer_start = buf; p->buffer_end = buf + buf_size; |
