Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
af3f0b21
Commit
af3f0b21
authored
Jul 18, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for mpga in wav (close #2957).
parent
9645e735
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
modules/demux/mpeg/es.c
modules/demux/mpeg/es.c
+19
-10
No files found.
modules/demux/mpeg/es.c
View file @
af3f0b21
...
...
@@ -545,21 +545,32 @@ static int MpgaGetFrameSamples( uint32_t h )
static
int
MpgaProbe
(
demux_t
*
p_demux
,
int64_t
*
pi_offset
)
{
const
int
pi_wav
[]
=
{
WAVE_FORMAT_MPEG
,
WAVE_FORMAT_MPEGLAYER3
,
WAVE_FORMAT_UNKNOWN
};
bool
b_forced
;
bool
b_forced_demux
;
int64_t
i_offset
;
const
uint8_t
*
p_peek
;
const
uint8_t
*
p_peek
;
int
i_skip
;
b_forced
=
demux_IsPathExtension
(
p_demux
,
".mp3"
);
b_forced_demux
=
demux_IsForced
(
p_demux
,
"mp3"
)
||
demux_IsForced
(
p_demux
,
"mpga"
);
i_offset
=
stream_Tell
(
p_demux
->
s
);
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
4
)
<
4
)
if
(
WavSkipHeader
(
p_demux
,
&
i_skip
,
pi_wav
)
)
{
if
(
!
b_forced_demux
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
if
(
!
MpgaCheckSync
(
p_peek
)
)
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_skip
+
4
)
<
i_skip
+
4
)
return
VLC_EGENERIC
;
if
(
!
MpgaCheckSync
(
&
p_peek
[
i_skip
]
)
)
{
bool
b_ok
=
false
;
int
i_peek
;
...
...
@@ -567,22 +578,20 @@ static int MpgaProbe( demux_t *p_demux, int64_t *pi_offset )
if
(
!
b_forced_demux
&&
!
b_forced
)
return
VLC_EGENERIC
;
i_peek
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
8096
);
while
(
i_
peek
>
4
)
i_peek
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_skip
+
8096
);
while
(
i_
skip
+
4
<
i_peek
)
{
if
(
MpgaCheckSync
(
p_peek
)
)
if
(
MpgaCheckSync
(
&
p_peek
[
i_skip
]
)
)
{
b_ok
=
true
;
break
;
}
p_peek
+=
1
;
i_peek
-=
1
;
i_offset
++
;
i_skip
++
;
}
if
(
!
b_ok
&&
!
b_forced_demux
)
return
VLC_EGENERIC
;
}
*
pi_offset
=
i_offset
;
*
pi_offset
=
i_offset
+
i_skip
;
return
VLC_SUCCESS
;
}
...
...
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