bytestream2 init functions do not take unsigned for size so it does not have sense to use unsigned in other places.
Signed-off-by: Paul B Mahol <[email protected]> --- libavcodec/bytestream.h | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index 444f758..a793627 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -146,30 +146,30 @@ static av_always_inline void bytestream2_init_writer(PutByteContext *p, p->eof = 0; } -static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g) +static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g) { return g->buffer_end - g->buffer; } -static av_always_inline unsigned int bytestream2_get_bytes_left_p(PutByteContext *p) +static av_always_inline int bytestream2_get_bytes_left_p(PutByteContext *p) { return p->buffer_end - p->buffer; } static av_always_inline void bytestream2_skip(GetByteContext *g, - unsigned int size) + int size) { g->buffer += FFMIN(g->buffer_end - g->buffer, size); } static av_always_inline void bytestream2_skipu(GetByteContext *g, - unsigned int size) + int size) { g->buffer += size; } static av_always_inline void bytestream2_skip_p(PutByteContext *p, - unsigned int size) + int size) { int size2; if (p->eof) @@ -245,9 +245,9 @@ static av_always_inline int bytestream2_seek_p(PutByteContext *p, return bytestream2_tell_p(p); } -static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, - uint8_t *dst, - unsigned int size) +static av_always_inline int bytestream2_get_buffer(GetByteContext *g, + uint8_t *dst, + int size) { int size2 = FFMIN(g->buffer_end - g->buffer, size); memcpy(dst, g->buffer, size2); @@ -255,18 +255,18 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, return size2; } -static av_always_inline unsigned int bytestream2_get_bufferu(GetByteContext *g, - uint8_t *dst, - unsigned int size) +static av_always_inline int bytestream2_get_bufferu(GetByteContext *g, + uint8_t *dst, + int size) { memcpy(dst, g->buffer, size); g->buffer += size; return size; } -static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, - const uint8_t *src, - unsigned int size) +static av_always_inline int bytestream2_put_buffer(PutByteContext *p, + const uint8_t *src, + int size) { int size2; if (p->eof) @@ -279,9 +279,9 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, return size2; } -static av_always_inline unsigned int bytestream2_put_bufferu(PutByteContext *p, - const uint8_t *src, - unsigned int size) +static av_always_inline int bytestream2_put_bufferu(PutByteContext *p, + const uint8_t *src, + int size) { memcpy(p->buffer, src, size); p->buffer += size; @@ -290,7 +290,7 @@ static av_always_inline unsigned int bytestream2_put_bufferu(PutByteContext *p, static av_always_inline void bytestream2_set_buffer(PutByteContext *p, const uint8_t c, - unsigned int size) + int size) { int size2; if (p->eof) @@ -304,20 +304,20 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p, static av_always_inline void bytestream2_set_bufferu(PutByteContext *p, const uint8_t c, - unsigned int size) + int size) { memset(p->buffer, c, size); p->buffer += size; } -static av_always_inline unsigned int bytestream2_get_eof(PutByteContext *p) +static av_always_inline int bytestream2_get_eof(PutByteContext *p) { return p->eof; } -static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, +static av_always_inline int bytestream_get_buffer(const uint8_t **b, uint8_t *dst, - unsigned int size) + int size) { memcpy(dst, *b, size); (*b) += size; @@ -326,7 +326,7 @@ static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, - unsigned int size) + int size) { memcpy(*b, src, size); (*b) += size; -- 1.7.7 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
