mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avcodec/libopenjpegdec: fix mixed declarations and code
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
0cd9ff4e3a
commit
21cd0228be
@ -126,10 +126,12 @@ typedef struct BufferReader {
|
||||
static OPJ_SIZE_T stream_read(void *out_buffer, OPJ_SIZE_T nb_bytes, void *user_data)
|
||||
{
|
||||
BufferReader *reader = user_data;
|
||||
int remaining;
|
||||
|
||||
if (reader->pos == reader->size) {
|
||||
return (OPJ_SIZE_T)-1;
|
||||
}
|
||||
int remaining = reader->size - reader->pos;
|
||||
remaining = reader->size - reader->pos;
|
||||
if (nb_bytes > remaining) {
|
||||
nb_bytes = remaining;
|
||||
}
|
||||
@ -149,10 +151,12 @@ static OPJ_OFF_T stream_skip(OPJ_OFF_T nb_bytes, void *user_data)
|
||||
nb_bytes = -reader->pos;
|
||||
}
|
||||
} else {
|
||||
int remaining;
|
||||
|
||||
if (reader->pos == reader->size) {
|
||||
return (OPJ_SIZE_T)-1;
|
||||
}
|
||||
int remaining = reader->size - reader->pos;
|
||||
remaining = reader->size - reader->pos;
|
||||
if (nb_bytes > remaining) {
|
||||
nb_bytes = remaining;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user