[vlc-commits] sout: sdi: flush on drain
Francois Cartegnie
git at videolan.org
Mon Oct 8 18:11:33 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 4 18:15:26 2018 +0200| [2685d0f94600703804834e85235f18c522be9319] | committer: Francois Cartegnie
sout: sdi: flush on drain
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2685d0f94600703804834e85235f18c522be9319
---
modules/stream_out/sdi/AES3Audio.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/stream_out/sdi/AES3Audio.cpp b/modules/stream_out/sdi/AES3Audio.cpp
index 60d46ee509..1db8b671bb 100644
--- a/modules/stream_out/sdi/AES3Audio.cpp
+++ b/modules/stream_out/sdi/AES3Audio.cpp
@@ -98,8 +98,10 @@ void AES3AudioBuffer::flushConsumed()
{
size_t bytes = FramesToBytes(toconsume);
bytestream_mutex.lock();
- block_SkipBytes(&bytestream, bytes);
- block_BytestreamFlush(&bytestream);
+ if(block_SkipBytes(&bytestream, bytes) == VLC_SUCCESS)
+ block_BytestreamFlush(&bytestream);
+ else
+ block_BytestreamEmpty(&bytestream);
bytestream_mutex.unlock();
toconsume = 0;
}
More information about the vlc-commits
mailing list