From 46bf6027eacaec6d922be0e72e8403a10bbc25be Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 3 Mar 2014 22:13:40 +0000 Subject: [PATCH] Only update the decode state when decoding --- pv/data/decoderstack.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index c197e01..b252877 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -427,7 +427,8 @@ void DecoderStack::on_data_received() { { unique_lock lock(_input_mutex); - _sample_count = _snapshot->get_sample_count(); + if (_snapshot) + _sample_count = _snapshot->get_sample_count(); } _input_cond.notify_one(); } @@ -436,7 +437,8 @@ void DecoderStack::on_frame_ended() { { unique_lock lock(_input_mutex); - _frame_complete = true; + if (_snapshot) + _frame_complete = true; } _input_cond.notify_one(); } -- 2.30.2