Show error instead silently failing tangent positive edge

If there is no file to save the stream to, tangent positive edge used to
silently fail. Fix it to show error message.
This commit is contained in:
Ilari Liusvaara 2015-01-30 20:18:18 +02:00
parent 2312324824
commit 58e4ad1b94
2 changed files with 8 additions and 3 deletions

View file

@ -1534,8 +1534,10 @@ out:
bitrate_tracker& brtrack)
{
threads::alock m2(current_collection_lock);
if(!current_collection)
if(!current_collection) {
messages << "No file to save stream set" << std::endl;
return;
}
try {
e.ctl(opus::reset);
e.ctl(opus::bitrate(SET_opus_bitrate(settings)));
@ -1653,12 +1655,15 @@ out:
break;
}
uint64_t ticks = framerate_regulator::get_utime();
//Handle tangent edgets.
//Handle tangent edges.
if(internal.active_flag && !active_stream) {
internal.drain_input();
buf_in_use = 0;
buf_inr_use = 0;
internal.handle_tangent_positive_edge(oenc, active_stream, brtrack);
//If stream didn't start, autodrop the activity flag.
if(!active_stream)
internal.active_flag = false;
}
else if((!internal.active_flag || quit) && active_stream)
internal.handle_tangent_negative_edge(active_stream, brtrack);

View file

@ -256,7 +256,7 @@ namespace sky
.priority = 0,
.handle = 0,
.multi = false,
.framemagic = {656250, 18227},
.framemagic = {18227, 656250},
.compatible_runs = {0}
}}),
core_sysregion("sky", *this, *this) { hide(); }