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
487825a5
Commit
487825a5
authored
May 16, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: asf: add workaround for audio es delay
parent
6cef8558
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+17
-7
No files found.
modules/demux/asf/asf.c
View file @
487825a5
...
...
@@ -239,6 +239,7 @@ static int Demux( demux_t *p_demux )
}
/* Set the PCR */
/* WARN: Don't move it before the end of the whole chunk */
p_sys
->
i_time
=
GetMoviePTS
(
p_sys
);
if
(
p_sys
->
i_time
>=
0
)
{
...
...
@@ -371,7 +372,7 @@ static void SeekPrepare( demux_t *p_demux )
if
(
!
tk
)
continue
;
tk
->
i_time
=
VLC_TS_INVALID
;
tk
->
i_time
=
-
1
;
if
(
tk
->
p_frame
)
block_ChainRelease
(
tk
->
p_frame
);
tk
->
p_frame
=
NULL
;
...
...
@@ -532,7 +533,7 @@ static mtime_t GetMoviePTS( demux_sys_t *p_sys )
/* early fail */
return
-
1
;
}
else
if
(
i_time
==
-
1
||
i_time
>
tk
->
i_time
)
else
if
(
tk
->
i_time
>
-
1
&&
(
i_time
==
-
1
||
i_time
>
tk
->
i_time
)
)
{
i_time
=
tk
->
i_time
;
}
...
...
@@ -600,7 +601,6 @@ static void SendPacket(demux_t *p_demux, asf_track_t *tk)
#ifdef ASF_DEBUG
msg_Dbg
(
p_demux
,
" sending packet dts %"
PRId64
" pts %"
PRId64
" pcr %"
PRId64
,
p_gather
->
i_dts
,
p_gather
->
i_pts
,
p_sys
->
i_time
);
#endif
es_out_Send
(
p_demux
->
out
,
tk
->
p_es
,
p_gather
);
tk
->
p_frame
=
NULL
;
}
...
...
@@ -860,12 +860,19 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
if
(
!
tk
->
p_es
)
goto
skip
;
if
(
b_preroll_done
)
bool
b_hugedelay
=
(
p_sys
->
p_fp
->
i_preroll
*
1000
>
CLOCK_FREQ
*
3
);
if
(
b_preroll_done
||
b_hugedelay
)
{
if
(
!
b_hugedelay
)
{
tk
->
i_time
=
INT64_C
(
1000
)
*
pkt
->
send_time
;
tk
->
i_time
-=
p_sys
->
p_fp
->
i_preroll
*
1000
;
tk
->
i_time
-=
tk
->
p_sp
->
i_time_offset
*
10
;
}
else
tk
->
i_time
=
i_base_pts
;
}
uint32_t
i_subpayload_count
=
0
;
while
(
i_payload_data_length
)
...
...
@@ -885,6 +892,9 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
i_payload_dts
-=
p_sys
->
p_fp
->
i_preroll
*
1000
;
i_payload_dts
-=
tk
->
p_sp
->
i_time_offset
*
10
;
if
(
b_hugedelay
)
i_payload_dts
=
i_base_pts
;
if
(
i_sub_payload_data_length
&&
DemuxSubPayload
(
p_demux
,
tk
,
i_sub_payload_data_length
,
i_payload_pts
,
i_payload_dts
,
i_media_object_offset
,
...
...
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