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
7d7fb701
Commit
7d7fb701
authored
Mar 01, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cpia: use AVFrame accessor functions
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f2326591
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cpia.c
libavcodec/cpia.c
+4
-4
No files found.
libavcodec/cpia.c
View file @
7d7fb701
...
...
@@ -114,12 +114,12 @@ static int cpia_decode_frame(AVCodecContext *avctx,
src
+=
2
;
if
(
src_size
<
linelength
)
{
frame
->
decode_error_flags
=
FF_DECODE_ERROR_INVALID_BITSTREAM
;
av_frame_set_decode_error_flags
(
frame
,
FF_DECODE_ERROR_INVALID_BITSTREAM
)
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"Frame ended enexpectedly!
\n
"
);
break
;
}
if
(
src
[
linelength
-
1
]
!=
EOL
)
{
frame
->
decode_error_flags
=
FF_DECODE_ERROR_INVALID_BITSTREAM
;
av_frame_set_decode_error_flags
(
frame
,
FF_DECODE_ERROR_INVALID_BITSTREAM
)
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"Wrong line length %d or line not terminated properly (found 0x%02x)!
\n
"
,
linelength
,
src
[
linelength
-
1
]);
break
;
}
...
...
@@ -140,7 +140,7 @@ static int cpia_decode_frame(AVCodecContext *avctx,
*/
for
(
j
=
0
;
j
<
linelength
-
1
;
j
++
)
{
if
(
y
>
y_end
)
{
frame
->
decode_error_flags
=
FF_DECODE_ERROR_INVALID_BITSTREAM
;
av_frame_set_decode_error_flags
(
frame
,
FF_DECODE_ERROR_INVALID_BITSTREAM
)
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"Decoded data exceeded linesize!
\n
"
);
break
;
}
...
...
@@ -160,7 +160,7 @@ static int cpia_decode_frame(AVCodecContext *avctx,
*/
for
(
j
=
0
;
j
<
linelength
-
4
;
)
{
if
(
y
+
1
>
y_end
||
u
>
u_end
||
v
>
v_end
)
{
frame
->
decode_error_flags
=
FF_DECODE_ERROR_INVALID_BITSTREAM
;
av_frame_set_decode_error_flags
(
frame
,
FF_DECODE_ERROR_INVALID_BITSTREAM
)
;
av_log
(
avctx
,
AV_LOG_WARNING
,
"Decoded data exceeded linesize!
\n
"
);
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