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
233f52fd
Commit
233f52fd
authored
Apr 04, 2018
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/amr: Stricter heuristic for auto-detection.
Fixes ticket #7125.
parent
92fe0bf1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
amr.c
libavformat/amr.c
+6
-4
version.h
libavformat/version.h
+1
-1
No files found.
libavformat/amr.c
View file @
233f52fd
...
@@ -178,7 +178,7 @@ AVInputFormat ff_amr_demuxer = {
...
@@ -178,7 +178,7 @@ AVInputFormat ff_amr_demuxer = {
#if CONFIG_AMRNB_DEMUXER
#if CONFIG_AMRNB_DEMUXER
static
int
amrnb_probe
(
AVProbeData
*
p
)
static
int
amrnb_probe
(
AVProbeData
*
p
)
{
{
int
mode
,
i
=
0
,
valid
=
0
;
int
mode
,
i
=
0
,
valid
=
0
,
invalid
=
0
;
const
uint8_t
*
b
=
p
->
buf
;
const
uint8_t
*
b
=
p
->
buf
;
while
(
i
<
p
->
buf_size
)
{
while
(
i
<
p
->
buf_size
)
{
...
@@ -197,10 +197,11 @@ static int amrnb_probe(AVProbeData *p)
...
@@ -197,10 +197,11 @@ static int amrnb_probe(AVProbeData *p)
}
}
}
else
{
}
else
{
valid
=
0
;
valid
=
0
;
invalid
++
;
i
++
;
i
++
;
}
}
}
}
if
(
valid
>
100
)
if
(
valid
>
100
&&
valid
>
invalid
)
return
AVPROBE_SCORE_EXTENSION
/
2
+
1
;
return
AVPROBE_SCORE_EXTENSION
/
2
+
1
;
return
0
;
return
0
;
}
}
...
@@ -234,7 +235,7 @@ AVInputFormat ff_amrnb_demuxer = {
...
@@ -234,7 +235,7 @@ AVInputFormat ff_amrnb_demuxer = {
#if CONFIG_AMRWB_DEMUXER
#if CONFIG_AMRWB_DEMUXER
static
int
amrwb_probe
(
AVProbeData
*
p
)
static
int
amrwb_probe
(
AVProbeData
*
p
)
{
{
int
mode
,
i
=
0
,
valid
=
0
;
int
mode
,
i
=
0
,
valid
=
0
,
invalid
=
0
;
const
uint8_t
*
b
=
p
->
buf
;
const
uint8_t
*
b
=
p
->
buf
;
while
(
i
<
p
->
buf_size
)
{
while
(
i
<
p
->
buf_size
)
{
...
@@ -253,10 +254,11 @@ static int amrwb_probe(AVProbeData *p)
...
@@ -253,10 +254,11 @@ static int amrwb_probe(AVProbeData *p)
}
}
}
else
{
}
else
{
valid
=
0
;
valid
=
0
;
invalid
++
;
i
++
;
i
++
;
}
}
}
}
if
(
valid
>
100
)
if
(
valid
>
100
&&
valid
>
invalid
)
return
AVPROBE_SCORE_EXTENSION
/
2
-
1
;
return
AVPROBE_SCORE_EXTENSION
/
2
-
1
;
return
0
;
return
0
;
}
}
...
...
libavformat/version.h
View file @
233f52fd
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 11
#define LIBAVFORMAT_VERSION_MINOR 11
#define LIBAVFORMAT_VERSION_MICRO 10
0
#define LIBAVFORMAT_VERSION_MICRO 10
1
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
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