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
c2992b70
Commit
c2992b70
authored
Jan 30, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msrledec: move output pointer test up
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d8a7c495
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
msrledec.c
libavcodec/msrledec.c
+3
-3
No files found.
libavcodec/msrledec.c
View file @
c2992b70
...
...
@@ -203,6 +203,9 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
pos
+=
p2
;
}
else
{
//run of pixels
uint8_t
pix
[
3
];
//original pixel
if
((
pic
->
linesize
[
0
]
>
0
&&
output
+
p1
*
(
depth
>>
3
)
>
output_end
)
||
(
pic
->
linesize
[
0
]
<
0
&&
output
+
p1
*
(
depth
>>
3
)
<
output_end
))
continue
;
switch
(
depth
){
case
8
:
pix
[
0
]
=
bytestream2_get_byte
(
gb
);
break
;
...
...
@@ -215,9 +218,6 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
case
32
:
pix32
=
bytestream2_get_le32
(
gb
);
break
;
}
if
((
pic
->
linesize
[
0
]
>
0
&&
output
+
p1
*
(
depth
>>
3
)
>
output_end
)
||
(
pic
->
linesize
[
0
]
<
0
&&
output
+
p1
*
(
depth
>>
3
)
<
output_end
))
continue
;
for
(
i
=
0
;
i
<
p1
;
i
++
)
{
switch
(
depth
){
case
8
:
*
output
++
=
pix
[
0
];
...
...
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