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
0fe9b698
Commit
0fe9b698
authored
Nov 15, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* set dts/length of all pes packet.
parent
cfd8992a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
modules/mux/mpeg/pes.c
modules/mux/mpeg/pes.c
+17
-2
No files found.
modules/mux/mpeg/pes.c
View file @
0fe9b698
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* pes.c: PES packetizer used by the MPEG multiplexers
* pes.c: PES packetizer used by the MPEG multiplexers
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* 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>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
* Eric Petit <titer@videolan.org>
...
@@ -235,7 +235,7 @@ int E_( EStoPES )( sout_instance_t *p_sout,
...
@@ -235,7 +235,7 @@ int E_( EStoPES )( sout_instance_t *p_sout,
int
b_mpeg2
)
int
b_mpeg2
)
{
{
sout_buffer_t
*
p_es_sav
,
*
p_pes
;
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
;
uint8_t
*
p_data
;
int
i_size
;
int
i_size
;
...
@@ -246,6 +246,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
...
@@ -246,6 +246,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
int
i_pes_payload
;
int
i_pes_payload
;
int
i_pes_header
;
int
i_pes_header
;
int
i_pes_count
=
1
;
/* HACK for private stream 1 in ps */
/* HACK for private stream 1 in ps */
if
(
(
i_stream_id
>>
8
)
==
PES_PRIVATE_STREAM_1
)
if
(
(
i_stream_id
>>
8
)
==
PES_PRIVATE_STREAM_1
)
{
{
...
@@ -297,6 +299,7 @@ int E_( EStoPES )( sout_instance_t *p_sout,
...
@@ -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_sout
->
p_vlc
->
pf_memcpy
(
p_pes
->
p_buffer
+
i_pes_header
,
p_data
,
i_pes_payload
);
p_data
,
i_pes_payload
);
}
}
i_pes_count
++
;
}
}
/* copy header */
/* copy header */
...
@@ -314,5 +317,17 @@ int E_( EStoPES )( sout_instance_t *p_sout,
...
@@ -314,5 +317,17 @@ int E_( EStoPES )( sout_instance_t *p_sout,
sout_BufferRealloc
(
p_sout
,
p_es_sav
,
p_es_sav
->
i_size
);
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
);
return
(
0
);
}
}
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