Skip to content
Snippets Groups Projects
Commit 155788e6 authored by tanel's avatar tanel
Browse files

Fix for adaptation state being get_property() is called soon after...

Fix for adaptation state being get_property() is called soon after initialization (https://github.com/alumae/gst-kaldi-nnet2-online/issues/1)
parent 5a0b370f
No related branches found
No related tags found
No related merge requests found
......@@ -465,8 +465,12 @@ static void gst_kaldinnet2onlinedecoder_get_property(GObject * object,
break;
case PROP_ADAPTATION_STATE:
string_stream.clear();
filter->adaptation_state->Write(string_stream, false);
g_value_set_string(value, string_stream.str().c_str());
if (filter->adaptation_state) {
filter->adaptation_state->Write(string_stream, false);
g_value_set_string(value, string_stream.str().c_str());
} else {
g_value_set_string(value, "");
}
break;
default:
if (prop_id >= PROP_LAST) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment