[vlc-commits] aout: update discontinuity flag
Rémi Denis-Courmont
git at videolan.org
Tue Nov 13 20:36:03 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 13 21:00:09 2012 +0200| [30635669e843ee893f12d14cf54a6a762e287613] | committer: Rémi Denis-Courmont
aout: update discontinuity flag
- Set the flag when the buffer is marked.
- Set the flag (for next buffer) when the buffer is dropped.
- Clear the flag when a buffer is played.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30635669e843ee893f12d14cf54a6a762e287613
---
src/audio_output/dec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 0832194..4857a99 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -406,6 +406,8 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate)
msg_Err (aout, "buffer too early (%"PRId64" us): dropped", advance);
goto drop;
}
+ if (block->i_flags & BLOCK_FLAG_DISCONTINUITY)
+ owner->sync.discontinuity = true;
block = aout_FiltersPlay (aout, block, input_rate);
if (block == NULL)
@@ -419,11 +421,13 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate)
/* Output */
owner->sync.end = block->i_pts + block->i_length + 1;
+ owner->sync.discontinuity = false;
aout_OutputPlay (aout, block);
out:
aout_unlock (aout);
return 0;
drop:
+ owner->sync.discontinuity = true;
block_Release (block);
lost:
atomic_fetch_add(&owner->buffers_lost, 1);
More information about the vlc-commits
mailing list