1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

sgidec: remove redundant argument from read_uncompressed_sgi()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-07-08 23:28:16 +00:00
parent 60351ec13c
commit 0f65693529

View File

@ -113,16 +113,15 @@ static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
/** /**
* Read an uncompressed SGI image. * Read an uncompressed SGI image.
* @param out_buf output buffer * @param out_buf output buffer
* @param out_end end ofoutput buffer
* @param s the current image state * @param s the current image state
* @return 0 if read success, otherwise return -1. * @return 0 if read success, otherwise return -1.
*/ */
static int read_uncompressed_sgi(unsigned char* out_buf, uint8_t* out_end, static int read_uncompressed_sgi(unsigned char* out_buf, SgiState *s)
SgiState *s)
{ {
int x, y, z; int x, y, z;
unsigned int offset = s->height * s->width * s->bytes_per_channel; unsigned int offset = s->height * s->width * s->bytes_per_channel;
GetByteContext gp[4]; GetByteContext gp[4];
uint8_t *out_end;
/* Test buffer size. */ /* Test buffer size. */
if (offset * s->depth > bytestream2_get_bytes_left(&s->g)) if (offset * s->depth > bytestream2_get_bytes_left(&s->g))
@ -228,7 +227,7 @@ static int decode_frame(AVCodecContext *avctx,
if (rle) { if (rle) {
ret = read_rle_sgi(out_end, s); ret = read_rle_sgi(out_end, s);
} else { } else {
ret = read_uncompressed_sgi(out_buf, out_end, s); ret = read_uncompressed_sgi(out_buf, s);
} }
if (ret == 0) { if (ret == 0) {