Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
21cd0228
Commit
21cd0228
authored
Mar 25, 2016
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libopenjpegdec: fix mixed declarations and code
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
0cd9ff4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
libopenjpegdec.c
libavcodec/libopenjpegdec.c
+6
-2
No files found.
libavcodec/libopenjpegdec.c
View file @
21cd0228
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment