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
5377385d
Commit
5377385d
authored
Sep 30, 2001
by
Arnaud de Bossoreille de Ribou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small optimisation of my previous commit.
parent
50f91594
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
27 deletions
+13
-27
src/ac3_spdif/ac3_spdif.c
src/ac3_spdif/ac3_spdif.c
+11
-26
src/ac3_spdif/ac3_spdif.h
src/ac3_spdif/ac3_spdif.h
+2
-1
No files found.
src/ac3_spdif/ac3_spdif.c
View file @
5377385d
...
...
@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.1
1 2001/09/29 14:52:01
bozo Exp $
* $Id: ac3_spdif.c,v 1.1
2 2001/09/30 20:25:13
bozo Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
...
...
@@ -150,6 +150,8 @@ static int InitThread( ac3_spdif_thread_t * p_spdif )
while
(
!
b_sync
)
{
while
(
GetBits
(
&
p_spdif
->
bit_stream
,
8
)
!=
0x0b
);
p_spdif
->
i_real_pts
=
p_spdif
->
i_pts
;
p_spdif
->
i_pts
=
0
;
b_sync
=
(
ShowBits
(
&
p_spdif
->
bit_stream
,
8
)
==
0x77
);
}
RemoveBits
(
&
p_spdif
->
bit_stream
,
8
);
...
...
@@ -191,10 +193,6 @@ static void RunThread( ac3_spdif_thread_t * p_spdif )
boolean_t
b_sync
;
/* PTS of the current frame */
mtime_t
i_current_pts
=
0
;
/* Valid value of p_spdif->i_pts */
mtime_t
i_real_pts
=
0
;
/* b_update_pts is used to know when p_spdif->i_pts is valid */
boolean_t
b_update_pts
=
1
;
/* Initializing the spdif decoder thread */
if
(
InitThread
(
p_spdif
)
)
...
...
@@ -208,37 +206,23 @@ static void RunThread( ac3_spdif_thread_t * p_spdif )
while
(
!
p_spdif
->
p_fifo
->
b_die
&&
!
p_spdif
->
p_fifo
->
b_error
)
{
/* Synchronous update of the PTS */
/* when b_update_pts is set p_spdif->i_pts is non-zero */
if
(
b_update_pts
/*&& p_spdif->i_pts */
)
{
i_real_pts
=
p_spdif
->
i_pts
;
p_spdif
->
i_pts
=
0
;
}
/* Handle the dates */
if
(
i_real_pts
)
if
(
p_spdif
->
i_real_pts
)
{
if
(
i_current_pts
+
i_frame_time
!=
i_real_pts
)
if
(
i_current_pts
+
i_frame_time
!=
p_spdif
->
i_real_pts
)
{
intf_WarnMsg
(
2
,
"spdif warning: date discontinuity (%d)"
,
i_real_pts
-
i_current_pts
-
i_frame_time
);
p_spdif
->
i_real_pts
-
i_current_pts
-
i_frame_time
);
}
i_current_pts
=
i_real_pts
;
i_real_pts
=
0
;
i_current_pts
=
p_spdif
->
i_real_pts
;
p_spdif
->
i_real_pts
=
0
;
}
else
{
i_current_pts
+=
i_frame_time
;
}
/* Delayed update of the PTS */
if
(
!
b_update_pts
&&
p_spdif
->
i_pts
)
{
i_real_pts
=
p_spdif
->
i_pts
;
p_spdif
->
i_pts
=
0
;
}
/* if we're late here the output won't have to play the frame */
if
(
i_current_pts
>
mdate
()
)
{
...
...
@@ -266,7 +250,8 @@ static void RunThread( ac3_spdif_thread_t * p_spdif )
while
(
!
b_sync
)
{
while
(
GetBits
(
&
p_spdif
->
bit_stream
,
8
)
!=
0x0b
);
b_update_pts
=
p_spdif
->
i_pts
;
p_spdif
->
i_real_pts
=
p_spdif
->
i_pts
;
p_spdif
->
i_pts
=
0
;
b_sync
=
(
ShowBits
(
&
p_spdif
->
bit_stream
,
8
)
==
0x77
);
}
RemoveBits
(
&
p_spdif
->
bit_stream
,
8
);
...
...
src/ac3_spdif/ac3_spdif.h
View file @
5377385d
...
...
@@ -2,7 +2,7 @@
* ac3_spdif.h: header for ac3 pass-through
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.h,v 1.
4 2001/06/09 17:01:22 stef
Exp $
* $Id: ac3_spdif.h,v 1.
5 2001/09/30 20:25:13 bozo
Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
*
...
...
@@ -58,6 +58,7 @@ typedef struct ac3_spdif_thread_s
/* current pes date */
mtime_t
i_pts
;
mtime_t
i_real_pts
;
/*
* Output properties
...
...
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