[vlc-commits] aout: fix check assert before play
Thomas Guillem
git at videolan.org
Wed Oct 19 10:06:46 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct 19 10:06:13 2016 +0200| [61b0186a63c93483c12098a5f12da0d6c9f30dce] | committer: Thomas Guillem
aout: fix check assert before play
i_buffer and i_nb_samples can be 0.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61b0186a63c93483c12098a5f12da0d6c9f30dce
---
src/audio_output/output.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 8a7f93b..13536ec 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -483,7 +483,8 @@ void aout_OutputPlay (audio_output_t *aout, block_t *block)
aout_OutputAssertLocked (aout);
#ifndef NDEBUG
aout_owner_t *owner = aout_owner (aout);
- assert (block->i_buffer / block->i_nb_samples ==
+ assert (owner->mixer_format.i_frame_length > 0);
+ assert (block->i_buffer == 0 || block->i_buffer / block->i_nb_samples ==
owner->mixer_format.i_bytes_per_frame /
owner->mixer_format.i_frame_length);
#endif
More information about the vlc-commits
mailing list