diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-09 21:00:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-09 21:00:33 +0100 |
commit | 8f92c0898d2b042374d98ab60ec4dd57f4dc2874 (patch) | |
tree | 0797121836f1ed9a3e92666a25ae067ee8869008 /libavformat | |
parent | 2e8020c66ccb51ca8dab47cd4fcb15f5c0277bbf (diff) | |
parent | ad94c6ca0b86c463f476b26606259a2041dcddc9 (diff) | |
download | ffmpeg-8f92c0898d2b042374d98ab60ec4dd57f4dc2874.tar.gz |
Merge commit 'ad94c6ca0b86c463f476b26606259a2041dcddc9'
* commit 'ad94c6ca0b86c463f476b26606259a2041dcddc9':
siff: Use the correct type for packet size variables
Conflicts:
libavformat/siff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/siff.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libavformat/siff.c b/libavformat/siff.c index 83ff8be3c3..a7c3a8bacd 100644 --- a/libavformat/siff.c +++ b/libavformat/siff.c @@ -54,11 +54,11 @@ typedef struct SIFFContext { int has_audio; int curstrm; - int pktsize; + unsigned int pktsize; int gmcsize; int sndsize; - int flags; + unsigned int flags; uint8_t gmc[4]; } SIFFContext; @@ -192,9 +192,9 @@ static int siff_read_header(AVFormatContext *s) static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) { SIFFContext *c = s->priv_data; - int size; if (c->has_video) { + unsigned int size; if (c->cur_frame >= c->frames) return AVERROR_EOF; if (c->curstrm == -1) { @@ -224,10 +224,11 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = 0; c->curstrm = -1; } else { - if ((size = av_get_packet(s->pb, pkt, c->sndsize - 4)) < 0) + int pktsize = av_get_packet(s->pb, pkt, c->sndsize - 4); + if (pktsize < 0) return AVERROR(EIO); pkt->stream_index = 1; - pkt->duration = size; + pkt->duration = pktsize; c->curstrm = 0; } if (!c->cur_frame || c->curstrm) @@ -235,12 +236,12 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) if (c->curstrm == -1) c->cur_frame++; } else { - size = av_get_packet(s->pb, pkt, c->block_align); - if (!size) + int pktsize = av_get_packet(s->pb, pkt, c->block_align); + if (!pktsize) return AVERROR_EOF; - if (size < 0) + if (pktsize <= 0) return AVERROR(EIO); - pkt->duration = size; + pkt->duration = pktsize; } return pkt->size; } |