Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
0fe9b698
Commit
0fe9b698
authored
Nov 15, 2003
by
Laurent Aimar
Browse files
* set dts/length of all pes packet.
parent
cfd8992a
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/mux/mpeg/pes.c
View file @
0fe9b698
...
...
@@ -2,7 +2,7 @@
* pes.c: PES packetizer used by the MPEG multiplexers
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: pes.c,v 1.1
1
2003/
08
/15
01:58:46
fenrir Exp $
* $Id: pes.c,v 1.1
2
2003/
11
/15
18:57:12
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -235,7 +235,7 @@ int E_( EStoPES )( sout_instance_t *p_sout,
int
b_mpeg2
)
{
sout_buffer_t
*
p_es_sav
,
*
p_pes
;
mtime_t
i_pts
,
i_dts
;
mtime_t
i_pts
,
i_dts
,
i_length
;
uint8_t
*
p_data
;
int
i_size
;
...
...
@@ -246,6 +246,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
int
i_pes_payload
;
int
i_pes_header
;
int
i_pes_count
=
1
;
/* HACK for private stream 1 in ps */
if
(
(
i_stream_id
>>
8
)
==
PES_PRIVATE_STREAM_1
)
{
...
...
@@ -297,6 +299,7 @@ int E_( EStoPES )( sout_instance_t *p_sout,
p_sout
->
p_vlc
->
pf_memcpy
(
p_pes
->
p_buffer
+
i_pes_header
,
p_data
,
i_pes_payload
);
}
i_pes_count
++
;
}
/* copy header */
...
...
@@ -314,5 +317,17 @@ int E_( EStoPES )( sout_instance_t *p_sout,
sout_BufferRealloc
(
p_sout
,
p_es_sav
,
p_es_sav
->
i_size
);
}
/* Now redate all pes */
i_dts
=
(
*
pp_pes
)
->
i_dts
;
i_length
=
(
*
pp_pes
)
->
i_length
/
i_pes_count
;
for
(
p_pes
=
*
pp_pes
;
p_pes
!=
NULL
;
p_pes
=
p_pes
->
p_next
)
{
p_pes
->
i_dts
=
i_dts
;
p_pes
->
i_length
=
i_length
;
i_dts
+=
i_length
;
}
return
(
0
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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