Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
d28dedab
Commit
d28dedab
authored
Dec 07, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: asf: don't update PCR until preroll is done
parent
8e7a55dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+11
-3
No files found.
modules/demux/asf/asf.c
View file @
d28dedab
...
...
@@ -666,6 +666,8 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
uint8_t
i_pts_delta
=
0
;
uint32_t
i_payload_data_length
=
0
;
uint32_t
i_temp_payload_length
=
0
;
bool
b_preroll_done
=
false
;
p_sys
->
p_fp
->
i_preroll
=
__MIN
(
p_sys
->
p_fp
->
i_preroll
,
__INT64_MAX__
);
/* Non compressed */
if
(
i_replicated_data_length
>
7
)
// should be at least 8 bytes
...
...
@@ -677,6 +679,7 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
ParsePayloadExtensions
(
p_demux
,
p_sys
->
track
[
i_stream_number
],
pkt
,
i_replicated_data_length
,
&
b_packet_keyframe
);
b_preroll_done
=
(
i_base_pts
>
(
int64_t
)
p_sys
->
p_fp
->
i_preroll
);
i_base_pts
-=
p_sys
->
p_fp
->
i_preroll
;
pkt
->
i_skip
+=
i_replicated_data_length
;
...
...
@@ -687,6 +690,7 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
{
/* optional DWORDS missing */
i_base_pts
=
(
mtime_t
)
pkt
->
send_time
;
b_preroll_done
=
(
i_base_pts
>
(
int64_t
)
p_sys
->
p_fp
->
i_preroll
);
}
/* Compressed payload */
else
if
(
i_replicated_data_length
==
1
)
...
...
@@ -695,6 +699,7 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
/* Next byte is Presentation Time Delta */
i_pts_delta
=
pkt
->
p_peek
[
pkt
->
i_skip
];
i_base_pts
=
(
mtime_t
)
i_media_object_offset
;
b_preroll_done
=
(
i_base_pts
>
(
int64_t
)
p_sys
->
p_fp
->
i_preroll
);
i_base_pts
-=
p_sys
->
p_fp
->
i_preroll
;
pkt
->
i_skip
++
;
i_media_object_offset
=
0
;
...
...
@@ -759,9 +764,12 @@ static int DemuxPayload(demux_t *p_demux, struct asf_packet_t *pkt, int i_payloa
if
(
!
tk
->
p_es
)
goto
skip
;
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
;
if
(
b_preroll_done
)
{
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
;
}
uint32_t
i_subpayload_count
=
0
;
while
(
i_payload_data_length
)
...
...
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