Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
06bede95
Commit
06bede95
authored
11 years ago
by
Carl Eugen Hoyos
Browse files
Options
Downloads
Patches
Plain Diff
Autodetect idcin only if audio properties allow decoding.
Fixes ticket #2688.
parent
4110828e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/idcin.c
+5
-5
5 additions, 5 deletions
libavformat/idcin.c
with
5 additions
and
5 deletions
libavformat/idcin.c
+
5
−
5
View file @
06bede95
...
...
@@ -93,7 +93,7 @@ typedef struct IdcinDemuxContext {
static
int
idcin_probe
(
AVProbeData
*
p
)
{
unsigned
int
number
;
unsigned
int
number
,
sample_rate
;
/*
* This is what you could call a "probabilistic" file check: id CIN
...
...
@@ -122,18 +122,18 @@ static int idcin_probe(AVProbeData *p)
return
0
;
/* check the audio sample rate */
number
=
AV_RL32
(
&
p
->
buf
[
8
]);
if
(
(
number
!=
0
)
&&
((
number
<
8000
)
|
(
number
>
48000
))
)
sample_rate
=
AV_RL32
(
&
p
->
buf
[
8
]);
if
(
sample_rate
&&
(
sample_rate
<
8000
||
sample_rate
>
48000
))
return
0
;
/* check the audio bytes/sample */
number
=
AV_RL32
(
&
p
->
buf
[
12
]);
if
(
number
>
2
)
if
(
number
>
2
||
sample_rate
&&
!
number
)
return
0
;
/* check the audio channels */
number
=
AV_RL32
(
&
p
->
buf
[
16
]);
if
(
number
>
2
)
if
(
number
>
2
||
sample_rate
&&
!
number
)
return
0
;
/* return half certainty since this check is a bit sketchy */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment