From e3a0f158376a38abb2eb9aa4a67b155ff9da6ffe Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 7 Sep 2014 21:50:27 +0200 Subject: Decoder*: add more assertions --- src/DecoderAPI.cxx | 4 ++++ src/DecoderInternal.cxx | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/DecoderAPI.cxx b/src/DecoderAPI.cxx index e4122d60e..334d069bf 100644 --- a/src/DecoderAPI.cxx +++ b/src/DecoderAPI.cxx @@ -47,6 +47,7 @@ decoder_initialized(Decoder &decoder, assert(dc.state == DecoderState::START); assert(dc.pipe != nullptr); + assert(dc.pipe->IsEmpty()); assert(decoder.stream_tag == nullptr); assert(decoder.decoder_tag == nullptr); assert(!decoder.seeking); @@ -405,6 +406,9 @@ decoder_data(Decoder &decoder, length == 0) return cmd; + assert(!decoder.initial_seek_pending); + assert(!decoder.initial_seek_running); + /* send stream tags */ if (update_stream_tag(decoder, is)) { diff --git a/src/DecoderInternal.cxx b/src/DecoderInternal.cxx index d5f40ad48..b5e6c9d57 100644 --- a/src/DecoderInternal.cxx +++ b/src/DecoderInternal.cxx @@ -83,6 +83,9 @@ void decoder_flush_chunk(Decoder &decoder) { DecoderControl &dc = decoder.dc; + assert(!decoder.seeking); + assert(!decoder.initial_seek_running); + assert(!decoder.initial_seek_pending); assert(decoder.chunk != nullptr); -- cgit v1.2.3