Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7b8d1eba
Commit
7b8d1eba
authored
Dec 07, 2009
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpga: use VLC_TS_INVALID (refs #3135)
parent
1aa2b0c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/codec/mpeg_audio.c
modules/codec/mpeg_audio.c
+4
-3
No files found.
modules/codec/mpeg_audio.c
View file @
7b8d1eba
...
@@ -149,6 +149,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -149,6 +149,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_state
=
STATE_NOSYNC
;
p_sys
->
i_state
=
STATE_NOSYNC
;
date_Set
(
&
p_sys
->
end_date
,
0
);
date_Set
(
&
p_sys
->
end_date
,
0
);
p_sys
->
bytestream
=
block_BytestreamInit
();
p_sys
->
bytestream
=
block_BytestreamInit
();
p_sys
->
i_pts
=
VLC_TS_INVALID
;
p_sys
->
b_discontinuity
=
false
;
p_sys
->
b_discontinuity
=
false
;
/* Set output properties */
/* Set output properties */
...
@@ -216,7 +217,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -216,7 +217,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
return
NULL
;
return
NULL
;
}
}
if
(
!
date_Get
(
&
p_sys
->
end_date
)
&&
!
(
*
pp_block
)
->
i_pts
)
if
(
!
date_Get
(
&
p_sys
->
end_date
)
&&
(
*
pp_block
)
->
i_pts
<=
VLC_TS_INVALID
)
{
{
/* We've just started the stream, wait for the first PTS. */
/* We've just started the stream, wait for the first PTS. */
msg_Dbg
(
p_dec
,
"waiting for PTS"
);
msg_Dbg
(
p_dec
,
"waiting for PTS"
);
...
@@ -254,7 +255,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -254,7 +255,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
case
STATE_SYNC
:
case
STATE_SYNC
:
/* New frame, set the Presentation Time Stamp */
/* New frame, set the Presentation Time Stamp */
p_sys
->
i_pts
=
p_sys
->
bytestream
.
p_block
->
i_pts
;
p_sys
->
i_pts
=
p_sys
->
bytestream
.
p_block
->
i_pts
;
if
(
p_sys
->
i_pts
!=
0
&&
if
(
p_sys
->
i_pts
>
VLC_TS_INVALID
&&
p_sys
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
p_sys
->
i_pts
!=
date_Get
(
&
p_sys
->
end_date
)
)
{
{
date_Set
(
&
p_sys
->
end_date
,
p_sys
->
i_pts
);
date_Set
(
&
p_sys
->
end_date
,
p_sys
->
i_pts
);
...
@@ -470,7 +471,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -470,7 +471,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* Make sure we don't reuse the same pts twice */
/* Make sure we don't reuse the same pts twice */
if
(
p_sys
->
i_pts
==
p_sys
->
bytestream
.
p_block
->
i_pts
)
if
(
p_sys
->
i_pts
==
p_sys
->
bytestream
.
p_block
->
i_pts
)
p_sys
->
i_pts
=
p_sys
->
bytestream
.
p_block
->
i_pts
=
0
;
p_sys
->
i_pts
=
p_sys
->
bytestream
.
p_block
->
i_pts
=
VLC_TS_INVALID
;
/* So p_block doesn't get re-added several times */
/* So p_block doesn't get re-added several times */
*
pp_block
=
block_BytestreamPop
(
&
p_sys
->
bytestream
);
*
pp_block
=
block_BytestreamPop
(
&
p_sys
->
bytestream
);
...
...
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