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
1de21215
Commit
1de21215
authored
Sep 12, 2015
by
Alex Agranovsky
Committed by
Michael Niedermayer
Sep 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpjpegde: trim header name/value of MIME headers
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
0572bd1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
mpjpegdec.c
libavformat/mpjpegdec.c
+15
-0
No files found.
libavformat/mpjpegdec.c
View file @
1de21215
...
...
@@ -40,6 +40,19 @@ static int get_line(AVIOContext *pb, char *line, int line_size)
return
0
;
}
static
void
trim_right
(
char
*
p
)
{
char
*
end
;
if
(
!
p
||
!*
p
)
return
;
end
=
p
+
strlen
(
p
)
-
1
;
while
(
end
!=
p
&&
av_isspace
(
*
end
))
{
*
end
=
'\0'
;
end
--
;
}
}
static
int
split_tag_value
(
char
**
tag
,
char
**
value
,
char
*
line
)
{
char
*
p
=
line
;
...
...
@@ -51,6 +64,7 @@ static int split_tag_value(char **tag, char **value, char *line)
*
p
=
'\0'
;
*
tag
=
line
;
trim_right
(
*
tag
);
p
++
;
...
...
@@ -58,6 +72,7 @@ static int split_tag_value(char **tag, char **value, char *line)
p
++
;
*
value
=
p
;
trim_right
(
*
value
);
return
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