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
c219dac6
Commit
c219dac6
authored
Aug 19, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/mux/asf.c: don't forget to add the preroll offset to the data timestamps.
parent
1f9127b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
modules/mux/asf.c
modules/mux/asf.c
+10
-5
No files found.
modules/mux/asf.c
View file @
c219dac6
...
...
@@ -93,6 +93,7 @@ typedef struct
uint16_t
v2
;
/* le */
uint16_t
v3
;
/* le */
uint8_t
v4
[
8
];
}
guid_t
;
typedef
struct
...
...
@@ -109,6 +110,7 @@ typedef struct
int
i_extra
;
uint8_t
*
p_extra
;
}
asf_track_t
;
struct
sout_mux_sys_t
...
...
@@ -118,6 +120,7 @@ struct sout_mux_sys_t
int64_t
i_packet_count
;
mtime_t
i_dts_first
;
mtime_t
i_dts_last
;
mtime_t
i_preroll_time
;
int64_t
i_bitrate
;
int
i_track
;
...
...
@@ -192,6 +195,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_pk_frame
=
0
;
p_sys
->
i_dts_first
=
-
1
;
p_sys
->
i_dts_last
=
0
;
p_sys
->
i_preroll_time
=
2000
;
p_sys
->
i_bitrate
=
0
;
p_sys
->
i_seq
=
0
;
...
...
@@ -619,8 +623,7 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts )
}
p_data
=
block_FifoShow
(
p_input
->
p_fifo
);
if
(
i_stream
==
-
1
||
p_data
->
i_dts
<
i_dts
)
if
(
i_stream
==
-
1
||
p_data
->
i_dts
<
i_dts
)
{
i_stream
=
i
;
i_dts
=
p_data
->
i_dts
;
...
...
@@ -904,7 +907,7 @@ static block_t *asf_header_create( sout_mux_t *p_mux, vlc_bool_t b_broadcast )
bo_addle_u64
(
&
bo
,
b_broadcast
?
0xffffffffLL
:
p_sys
->
i_packet_count
);
bo_addle_u64
(
&
bo
,
i_duration
*
10
);
/* play duration (100ns) */
bo_addle_u64
(
&
bo
,
i_duration
*
10
);
/* send duration (100ns) */
bo_addle_u64
(
&
bo
,
3000
);
/* preroll duration (ms) */
bo_addle_u64
(
&
bo
,
p_sys
->
i_preroll_time
);
/* preroll duration (ms) */
bo_addle_u32
(
&
bo
,
b_broadcast
?
0x01
:
0x00
);
/* flags */
bo_addle_u32
(
&
bo
,
p_sys
->
i_packet_size
);
/* packet size min */
bo_addle_u32
(
&
bo
,
p_sys
->
i_packet_size
);
/* packet size max */
...
...
@@ -1034,7 +1037,8 @@ static block_t *asf_packet_create( sout_mux_t *p_mux,
bo_addle_u32
(
&
bo
,
i_pos
);
bo_add_u8
(
&
bo
,
0x08
);
/* flags */
bo_addle_u32
(
&
bo
,
i_data
);
bo_addle_u32
(
&
bo
,
(
data
->
i_dts
-
p_sys
->
i_dts_first
)
/
1000
);
bo_addle_u32
(
&
bo
,
(
data
->
i_dts
-
p_sys
->
i_dts_first
)
/
1000
-
p_sys
->
i_preroll_time
);
bo_addle_u16
(
&
bo
,
i_payload
);
bo_add_mem
(
&
bo
,
&
p_data
[
i_pos
],
i_payload
);
i_pos
+=
i_payload
;
...
...
@@ -1059,7 +1063,8 @@ static block_t *asf_packet_create( sout_mux_t *p_mux,
bo_add_u8
(
&
bo
,
0x11
);
bo_add_u8
(
&
bo
,
0x5d
);
bo_addle_u16
(
&
bo
,
i_pad
);
bo_addle_u32
(
&
bo
,
(
p_sys
->
i_pk_dts
-
p_sys
->
i_dts_first
)
/
1000
);
bo_addle_u32
(
&
bo
,
(
p_sys
->
i_pk_dts
-
p_sys
->
i_dts_first
)
/
1000
-
p_sys
->
i_preroll_time
);
bo_addle_u16
(
&
bo
,
0
*
data
->
i_length
/
1000
);
bo_add_u8
(
&
bo
,
0x80
|
p_sys
->
i_pk_frame
);
...
...
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