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
7218352e
Commit
7218352e
authored
Oct 01, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/srtdec: more lenient first line probing
Fixes Ticket #4898
parent
d161a2a7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
srtdec.c
libavformat/srtdec.c
+4
-2
No files found.
libavformat/srtdec.c
View file @
7218352e
...
...
@@ -41,9 +41,11 @@ static int srt_probe(AVProbeData *p)
ff_text_r8
(
&
tr
);
/* Check if the first non-empty line is a number. We do not check what the
* number is because in practice it can be anything. */
* number is because in practice it can be anything.
* Also, that number can be followed by random garbage, so we can not
* unfortunately check that we only have a number. */
if
(
ff_subtitles_read_line
(
&
tr
,
buf
,
sizeof
(
buf
))
<
0
||
strtol
(
buf
,
&
pbuf
,
10
)
<
0
||
*
pbuf
)
strtol
(
buf
,
&
pbuf
,
10
)
<
0
)
return
0
;
/* Check if the next line matches a SRT timestamp */
...
...
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