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
32784aa8
Commit
32784aa8
authored
Nov 15, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: set PTS correctly on silence blocks
parent
1efed28e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/audio_output/dec.c
src/audio_output/dec.c
+4
-3
No files found.
src/audio_output/dec.c
View file @
32784aa8
...
...
@@ -240,7 +240,7 @@ static void aout_StopResampling (audio_output_t *aout)
aout_FiltersAdjustResampling
(
aout
,
0
);
}
static
void
aout_DecSilence
(
audio_output_t
*
aout
,
mtime_t
length
)
static
void
aout_DecSilence
(
audio_output_t
*
aout
,
mtime_t
length
,
mtime_t
pts
)
{
aout_owner_t
*
owner
=
aout_owner
(
aout
);
const
audio_sample_format_t
*
fmt
=
&
owner
->
mixer_format
;
...
...
@@ -257,8 +257,9 @@ static void aout_DecSilence (audio_output_t *aout, mtime_t length)
msg_Dbg
(
aout
,
"inserting %zu zeroes"
,
frames
);
memset
(
block
->
p_buffer
,
0
,
block
->
i_buffer
);
block
->
i_nb_samples
=
frames
;
block
->
i_pts
=
pts
;
block
->
i_dts
=
pts
;
block
->
i_length
=
length
;
/* FIXME: PTS... */
aout_OutputPlay
(
aout
,
block
);
}
...
...
@@ -323,7 +324,7 @@ static void aout_DecSynchronize (audio_output_t *aout, mtime_t dec_pts,
if
(
!
owner
->
sync
.
discontinuity
)
msg_Warn
(
aout
,
"playback way too early (%"
PRId64
"): "
"playing silence"
,
drift
);
aout_DecSilence
(
aout
,
-
drift
);
aout_DecSilence
(
aout
,
-
drift
,
dec_pts
);
aout_StopResampling
(
aout
);
owner
->
sync
.
discontinuity
=
true
;
...
...
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