Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
1c04b2ad
Commit
1c04b2ad
authored
Apr 26, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mpegaudio: if the file name end by .mp3, use a stronger dectection.
(over the first 2ko).
parent
1e81f9cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
modules/demux/mpeg/audio.c
modules/demux/mpeg/audio.c
+18
-5
No files found.
modules/demux/mpeg/audio.c
View file @
1c04b2ad
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* audio.c : mpeg audio Stream input module for vlc
* audio.c : mpeg audio Stream input module for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: audio.c,v 1.1
6 2003/03/30 18:14:37 gbazin
Exp $
* $Id: audio.c,v 1.1
7 2003/04/26 20:51:54 fenrir
Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -487,6 +487,8 @@ static int Activate( vlc_object_t * p_this )
...
@@ -487,6 +487,8 @@ static int Activate( vlc_object_t * p_this )
int
b_forced
;
int
b_forced
;
int
i_skip
;
int
i_skip
;
int
i_max_pos
;
/* Set the demux function */
/* Set the demux function */
p_input
->
pf_demux
=
Demux
;
p_input
->
pf_demux
=
Demux
;
...
@@ -497,16 +499,27 @@ static int Activate( vlc_object_t * p_this )
...
@@ -497,16 +499,27 @@ static int Activate( vlc_object_t * p_this )
p_input
->
i_bufsize
=
INPUT_DEFAULT_BUFSIZE
;
p_input
->
i_bufsize
=
INPUT_DEFAULT_BUFSIZE
;
}
}
b_forced
=
VLC_FALSE
;
i_max_pos
=
MPEGAUDIO_MAXTESTPOS
;
if
(
(
*
p_input
->
psz_demux
)
if
(
(
*
p_input
->
psz_demux
)
&&
(
(
!
strncmp
(
p_input
->
psz_demux
,
"mpegaudio"
,
10
)
)
||
&&
(
(
!
strncmp
(
p_input
->
psz_demux
,
"mpegaudio"
,
10
)
)
||
(
!
strncmp
(
p_input
->
psz_demux
,
"mp3"
,
3
)
)
)
)
(
!
strncmp
(
p_input
->
psz_demux
,
"mp3"
,
3
)
)
)
)
{
{
b_forced
=
1
;
b_forced
=
VLC_TRUE
;
i_max_pos
=
4000
;
}
}
else
else
if
(
p_input
->
psz_name
)
{
{
b_forced
=
0
;
char
*
name
=
p_input
->
psz_name
;
int
i_len
=
strlen
(
name
);
if
(
i_len
>
4
&&
!
strcasecmp
(
&
name
[
i_len
-
4
],
".mp3"
)
)
{
i_max_pos
=
2000
;
}
}
}
p_id3
=
module_Need
(
p_input
,
"id3"
,
NULL
);
p_id3
=
module_Need
(
p_input
,
"id3"
,
NULL
);
if
(
p_id3
)
{
if
(
p_id3
)
{
module_Unneed
(
p_input
,
p_id3
);
module_Unneed
(
p_input
,
p_id3
);
...
@@ -531,7 +544,7 @@ static int Activate( vlc_object_t * p_this )
...
@@ -531,7 +544,7 @@ static int Activate( vlc_object_t * p_this )
/* must be sure that is mpeg audio stream unless forced */
/* must be sure that is mpeg audio stream unless forced */
if
(
!
(
i_found
=
GetHeader
(
p_input
,
if
(
!
(
i_found
=
GetHeader
(
p_input
,
&
p_demux
->
mpeg
,
&
p_demux
->
mpeg
,
b_forced
?
4000
:
MPEGAUDIO_MAXTESTPOS
,
i_max_pos
,
&
i_skip
)
)
)
&
i_skip
)
)
)
{
{
if
(
b_forced
)
if
(
b_forced
)
...
...
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