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
de1a0d43
Commit
de1a0d43
authored
Mar 26, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/flicvideo: Implement padding in COPY chunks.
Reviewed-by: Reimar
parent
c06bdc60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
flicvideo.c
libavcodec/flicvideo.c
+6
-2
No files found.
libavcodec/flicvideo.c
View file @
de1a0d43
...
...
@@ -423,7 +423,7 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
case
FLI_COPY
:
/* copy the chunk (uncompressed frame) */
if
(
chunk_size
-
6
!=
s
->
avctx
->
width
*
s
->
avctx
->
height
)
{
if
(
chunk_size
-
6
!=
FFALIGN
(
s
->
avctx
->
width
,
4
)
*
s
->
avctx
->
height
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"In chunk FLI_COPY : source data (%d bytes) "
\
"has incorrect size, skipping chunk
\n
"
,
chunk_size
-
6
);
bytestream2_skip
(
&
g2
,
chunk_size
-
6
);
...
...
@@ -432,6 +432,8 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
y_ptr
+=
s
->
frame
->
linesize
[
0
])
{
bytestream2_get_buffer
(
&
g2
,
&
pixels
[
y_ptr
],
s
->
avctx
->
width
);
if
(
s
->
avctx
->
width
&
3
)
bytestream2_skip
(
&
g2
,
4
-
(
s
->
avctx
->
width
&
3
));
}
}
break
;
...
...
@@ -711,7 +713,7 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
case
FLI_COPY
:
case
FLI_DTA_COPY
:
/* copy the chunk (uncompressed frame) */
if
(
chunk_size
-
6
>
(
unsigned
int
)(
s
->
avctx
->
width
*
s
->
avctx
->
height
)
*
2
)
{
if
(
chunk_size
-
6
>
(
unsigned
int
)(
FFALIGN
(
s
->
avctx
->
width
,
2
)
*
s
->
avctx
->
height
)
*
2
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"In chunk FLI_COPY : source data (%d bytes) "
\
"bigger than image, skipping chunk
\n
"
,
chunk_size
-
6
);
bytestream2_skip
(
&
g2
,
chunk_size
-
6
);
...
...
@@ -727,6 +729,8 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
pixel_ptr
+=
2
;
pixel_countdown
--
;
}
if
(
s
->
avctx
->
width
&
1
)
bytestream2_skip
(
&
g2
,
2
);
}
}
break
;
...
...
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