mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/bytestream: fix warnings with signed/unsigned compare in bytestream.h
When including the header in decklink_enc.cpp it would be fed through the C++ compiler rather than the C compiler, which has more strict warnings when comparing signed/unsigned values. Make the local variables unsigned to match the arguments they are being passed for those functions. Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
9d140ecaf8
commit
85c62b48e9
|
@ -180,7 +180,7 @@ static av_always_inline void bytestream2_skipu(GetByteContext *g,
|
||||||
static av_always_inline void bytestream2_skip_p(PutByteContext *p,
|
static av_always_inline void bytestream2_skip_p(PutByteContext *p,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
int size2;
|
unsigned int size2;
|
||||||
if (p->eof)
|
if (p->eof)
|
||||||
return;
|
return;
|
||||||
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
||||||
|
@ -268,7 +268,7 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g,
|
||||||
uint8_t *dst,
|
uint8_t *dst,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
int size2 = FFMIN(g->buffer_end - g->buffer, size);
|
unsigned int size2 = FFMIN(g->buffer_end - g->buffer, size);
|
||||||
memcpy(dst, g->buffer, size2);
|
memcpy(dst, g->buffer, size2);
|
||||||
g->buffer += size2;
|
g->buffer += size2;
|
||||||
return size2;
|
return size2;
|
||||||
|
@ -287,7 +287,7 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p,
|
||||||
const uint8_t *src,
|
const uint8_t *src,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
int size2;
|
unsigned int size2;
|
||||||
if (p->eof)
|
if (p->eof)
|
||||||
return 0;
|
return 0;
|
||||||
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
||||||
|
@ -311,7 +311,7 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p,
|
||||||
const uint8_t c,
|
const uint8_t c,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
int size2;
|
unsigned int size2;
|
||||||
if (p->eof)
|
if (p->eof)
|
||||||
return;
|
return;
|
||||||
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
||||||
|
@ -348,7 +348,7 @@ static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p,
|
||||||
GetByteContext *g,
|
GetByteContext *g,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
int size2;
|
unsigned int size2;
|
||||||
|
|
||||||
if (p->eof)
|
if (p->eof)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue