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
c1bc1967
Commit
c1bc1967
authored
Dec 28, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a typo that broke writing (and reading) PAM files.
Reported and reviewed by Derek Buitenhuis.
parent
0e5fbbd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
pamenc.c
libavcodec/pamenc.c
+1
-1
pnm.c
libavcodec/pnm.c
+3
-1
No files found.
libavcodec/pamenc.c
View file @
c1bc1967
...
...
@@ -78,7 +78,7 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf,
return
-
1
;
}
snprintf
(
s
->
bytestream
,
s
->
bytestream_end
-
s
->
bytestream
,
"P7
\n
WIDTH %d
\n
HEIGHT %d
\n
DEPTH %d
\n
MAXVAL %d
\n
TUPL
E
TYPE %s
\n
ENDHDR
\n
"
,
"P7
\n
WIDTH %d
\n
HEIGHT %d
\n
DEPTH %d
\n
MAXVAL %d
\n
TUPLTYPE %s
\n
ENDHDR
\n
"
,
w
,
h
,
depth
,
maxval
,
tuple_type
);
s
->
bytestream
+=
strlen
(
s
->
bytestream
);
...
...
libavcodec/pnm.c
View file @
c1bc1967
...
...
@@ -93,7 +93,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
}
else
if
(
!
strcmp
(
buf1
,
"MAXVAL"
))
{
pnm_get
(
s
,
buf1
,
sizeof
(
buf1
));
maxval
=
strtol
(
buf1
,
NULL
,
10
);
}
else
if
(
!
strcmp
(
buf1
,
"TUPLETYPE"
))
{
}
else
if
(
!
strcmp
(
buf1
,
"TUPLTYPE"
)
||
// FFmpeg used to write invalid files
!
strcmp
(
buf1
,
"TUPLETYPE"
))
{
pnm_get
(
s
,
tuple_type
,
sizeof
(
tuple_type
));
}
else
if
(
!
strcmp
(
buf1
,
"ENDHDR"
))
{
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