Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f28006a7
Commit
f28006a7
authored
Mar 25, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retry syncing mpeg audio stream if it failed on first block (Closes:#609)
parent
e4afdce0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
modules/demux/mpeg/mpga.c
modules/demux/mpeg/mpga.c
+21
-3
No files found.
modules/demux/mpeg/mpga.c
View file @
f28006a7
...
...
@@ -68,6 +68,8 @@ struct demux_sys_t
mtime_t
i_time_offset
;
int
i_bitrate_avg
;
/* extracted from Xing header */
vlc_bool_t
b_initial_sync_failed
;
int
i_xing_frames
;
int
i_xing_bytes
;
int
i_xing_bitrate_avg
;
...
...
@@ -108,6 +110,7 @@ static int mpga_frame_samples( uint32_t h )
}
}
/*****************************************************************************
* Open: initializes demux structures
*****************************************************************************/
...
...
@@ -252,12 +255,20 @@ static int Open( vlc_object_t * p_this )
p_block_in
->
i_pts
=
p_block_in
->
i_dts
=
1
;
p_block_out
=
p_sys
->
p_packetizer
->
pf_packetize
(
p_sys
->
p_packetizer
,
&
p_block_in
);
if
(
p_block_out
==
NULL
)
{
msg_Dbg
(
p_demux
,
"did not sync on first block"
);
p_sys
->
b_initial_sync_failed
=
VLC_TRUE
;
}
else
p_sys
->
b_initial_sync_failed
=
VLC_FALSE
;
p_sys
->
p_packetizer
->
fmt_out
.
b_packetized
=
VLC_TRUE
;
p_sys
->
p_es
=
es_out_Add
(
p_demux
->
out
,
&
p_sys
->
p_packetizer
->
fmt_out
);
p_sys
->
i_bitrate_avg
=
p_sys
->
p_packetizer
->
fmt_out
.
i_bitrate
;
if
(
p_sys
->
i_xing_bytes
&&
p_sys
->
i_xing_frames
&&
p_sys
->
i_xing_frame_samples
)
{
...
...
@@ -302,7 +313,14 @@ static int Demux( demux_t *p_demux )
{
return
0
;
}
p_block_in
->
i_pts
=
p_block_in
->
i_dts
=
0
;
if
(
p_demux
->
p_sys
->
b_initial_sync_failed
==
VLC_TRUE
)
{
p_block_in
->
i_pts
=
p_block_in
->
i_dts
=
1
;
/* Only try to resync once */
p_demux
->
p_sys
->
b_initial_sync_failed
=
0
;
}
else
p_block_in
->
i_pts
=
p_block_in
->
i_dts
=
0
;
p_block_out
=
p_sys
->
p_packetizer
->
pf_packetize
(
p_sys
->
p_packetizer
,
&
p_block_in
);
}
...
...
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