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
9e09dba8
Commit
9e09dba8
authored
Feb 08, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed (common) broken dts in wav (close #2494)
parent
613d7312
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
modules/demux/mpeg/es.c
modules/demux/mpeg/es.c
+16
-5
No files found.
modules/demux/mpeg/es.c
View file @
9e09dba8
...
...
@@ -671,17 +671,28 @@ static int GenericProbe( demux_t *p_demux, int64_t *pi_offset,
if
(
!
b_forced_demux
)
return
VLC_EGENERIC
;
}
const
bool
b_wav
=
i_skip
>
0
;
/* peek the begining */
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_skip
+
i_check_size
)
<
i_skip
+
i_check_size
)
/* peek the begining
* It is common that wav files have some sort of garbage at the begining */
const
int
i_probe
=
i_skip
+
i_check_size
+
(
b_wav
?
16000
:
0
);
const
int
i_peek
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_probe
);
if
(
i_peek
<
i_skip
+
i_check_size
)
{
msg_Err
(
p_demux
,
"cannot peek"
);
return
VLC_EGENERIC
;
}
if
(
!
pf_check
(
&
p_peek
[
i_skip
]
)
)
for
(
;;
)
{
if
(
!
b_forced_demux
)
return
VLC_EGENERIC
;
if
(
i_skip
+
i_check_size
>
i_peek
)
{
if
(
!
b_forced_demux
)
return
VLC_EGENERIC
;
break
;
}
if
(
pf_check
(
&
p_peek
[
i_skip
]
)
)
break
;
i_skip
++
;
}
*
pi_offset
=
i_offset
+
i_skip
;
...
...
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