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
3d42addf
Commit
3d42addf
authored
May 05, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
png_parser: try to fix big endian
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
16db88a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
png_parser.c
libavcodec/png_parser.c
+2
-3
No files found.
libavcodec/png_parser.c
View file @
3d42addf
...
...
@@ -24,7 +24,6 @@
* PNG parser
*/
#include "libavutil/intreadwrite.h"
#include "parser.h"
#define PNGSIG 0x89504e470d0a1a0a
...
...
@@ -76,7 +75,7 @@ static int png_parse(AVCodecParserContext *s, AVCodecContext *avctx,
for
(;
ppc
->
pc
.
frame_start_found
&&
i
<
buf_size
;
i
++
)
{
ppc
->
pc
.
state
=
(
ppc
->
pc
.
state
<<
8
)
|
buf
[
i
];
if
(
ppc
->
index
==
3
)
{
ppc
->
chunk_length
=
AV_RL32
(
&
ppc
->
pc
.
state
)
;
ppc
->
chunk_length
=
ppc
->
pc
.
state
;
if
(
ppc
->
chunk_length
>
0x7fffffff
)
{
ppc
->
index
=
ppc
->
pc
.
frame_start_found
=
0
;
goto
flush
;
...
...
@@ -85,7 +84,7 @@ static int png_parse(AVCodecParserContext *s, AVCodecContext *avctx,
}
else
if
(
ppc
->
index
==
7
)
{
if
(
ppc
->
chunk_length
>=
buf_size
-
i
)
ppc
->
remaining_size
=
ppc
->
chunk_length
-
buf_size
+
i
+
1
;
if
(
AV_RB32
(
&
ppc
->
pc
.
state
)
==
MK
TAG
(
'I'
,
'E'
,
'N'
,
'D'
))
{
if
(
ppc
->
pc
.
state
==
MKBE
TAG
(
'I'
,
'E'
,
'N'
,
'D'
))
{
if
(
ppc
->
remaining_size
)
ppc
->
index
=
-
1
;
else
...
...
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