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
18af7f2b
Commit
18af7f2b
authored
Dec 10, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/mux/mpeg/pes.c: fixed to handle 0 pts/dts correctly.
parent
55b93592
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
modules/mux/mpeg/pes.c
modules/mux/mpeg/pes.c
+10
-10
No files found.
modules/mux/mpeg/pes.c
View file @
18af7f2b
...
@@ -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
3 2003/12/01 23:39:11
gbazin Exp $
* $Id: pes.c,v 1.1
4 2003/12/10 23:16:04
gbazin 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>
...
@@ -92,12 +92,12 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
...
@@ -92,12 +92,12 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
{
{
int
i_pts_dts
;
int
i_pts_dts
;
if
(
i_pts
>
=
0
&&
i_dts
>=
0
)
if
(
i_pts
>
0
&&
i_dts
>
0
)
{
{
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
13
);
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
13
);
i_pts_dts
=
0x03
;
i_pts_dts
=
0x03
;
}
}
else
if
(
i_pts
>
=
0
)
else
if
(
i_pts
>
0
)
{
{
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
8
);
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
8
);
i_pts_dts
=
0x02
;
i_pts_dts
=
0x02
;
...
@@ -162,12 +162,12 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
...
@@ -162,12 +162,12 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
{
{
int
i_pts_dts
;
int
i_pts_dts
;
if
(
i_pts
>
=
0
&&
i_dts
>=
0
)
if
(
i_pts
>
0
&&
i_dts
>
0
)
{
{
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
10
/* + stuffing */
);
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
10
/* + stuffing */
);
i_pts_dts
=
0x03
;
i_pts_dts
=
0x03
;
}
}
else
if
(
i_pts
>
=
0
)
else
if
(
i_pts
>
0
)
{
{
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
5
/* + stuffing */
);
bits_write
(
&
bits
,
16
,
i_es_size
+
i_extra
+
5
/* + stuffing */
);
i_pts_dts
=
0x02
;
i_pts_dts
=
0x02
;
...
@@ -255,8 +255,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
...
@@ -255,8 +255,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
i_stream_id
=
PES_PRIVATE_STREAM_1
;
i_stream_id
=
PES_PRIVATE_STREAM_1
;
}
}
i_pts
=
p_es
->
i_pts
<
0
?
-
1
:
p_es
->
i_pts
*
9
/
100
;
// 90000 units clock
i_pts
=
p_es
->
i_pts
<
=
0
?
0
:
p_es
->
i_pts
*
9
/
100
;
// 90000 units clock
i_dts
=
p_es
->
i_dts
<
0
?
-
1
:
p_es
->
i_dts
*
9
/
100
;
// 90000 units clock
i_dts
=
p_es
->
i_dts
<
=
0
?
0
:
p_es
->
i_dts
*
9
/
100
;
// 90000 units clock
i_size
=
p_es
->
i_size
;
i_size
=
p_es
->
i_size
;
p_data
=
p_es
->
p_buffer
;
p_data
=
p_es
->
p_buffer
;
...
@@ -269,8 +269,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
...
@@ -269,8 +269,8 @@ int E_( EStoPES )( sout_instance_t *p_sout,
i_pes_payload
=
__MIN
(
i_size
,
PES_PAYLOAD_SIZE_MAX
);
i_pes_payload
=
__MIN
(
i_size
,
PES_PAYLOAD_SIZE_MAX
);
i_pes_header
=
PESHeader
(
header
,
i_pts
,
i_dts
,
i_pes_payload
,
i_pes_header
=
PESHeader
(
header
,
i_pts
,
i_dts
,
i_pes_payload
,
i_stream_id
,
i_private_id
,
b_mpeg2
);
i_stream_id
,
i_private_id
,
b_mpeg2
);
i_dts
=
-
1
;
// only first PES has a dts/pts
i_dts
=
0
;
// only first PES has a dts/pts
i_pts
=
-
1
;
i_pts
=
0
;
if
(
p_es
)
if
(
p_es
)
{
{
...
...
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