diff --git a/recording-daemon/db.c b/recording-daemon/db.c index 36fa42373..b780348cd 100644 --- a/recording-daemon/db.c +++ b/recording-daemon/db.c @@ -258,6 +258,8 @@ static void db_do_call_id(metafile_t *mf) { return; if (mf->skip_db) return; + if (!mf->metadata) + return; MYSQL_BIND b[2]; my_cstr(&b[0], mf->call_id); diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 37b9bccca..f49b08bf3 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -101,11 +101,11 @@ static void meta_mix_file_output(metafile_t *mf) { return; } - if (mf->mix) - return; + if (!mf->mix) { + mf->mix_out = output_new_ext(mf, "mix", "mixed", "mix"); + mf->mix = mix_new(&mf->mix_lock, &mf->mix_out->sink, mf->media_rec_slots); + } - mf->mix_out = output_new_ext(mf, "mix", "mixed", "mix"); - mf->mix = mix_new(&mf->mix_lock, &mf->mix_out->sink, mf->media_rec_slots); db_do_stream(mf, mf->mix_out, NULL, 0); } diff --git a/recording-daemon/packet.c b/recording-daemon/packet.c index 8ffcdf0f1..77be65b62 100644 --- a/recording-daemon/packet.c +++ b/recording-daemon/packet.c @@ -75,11 +75,14 @@ out: dbg("Init for SSRC %s%lx%s of stream #%lu", FMT_M(ret->ssrc), stream->id); - if (mf->recording_on && !ret->output && output_single) { - char buf[16]; - snprintf(buf, sizeof(buf), "%08lx", ssrc); - tag_t *tag = tag_get(mf, stream->tag); - ret->output = output_new_ext(mf, buf, "single", tag->label); + if (mf->recording_on && output_single) { + if (!ret->output) { + char buf[16]; + snprintf(buf, sizeof(buf), "%08lx", ssrc); + tag_t *tag = tag_get(mf, stream->tag); + ret->output = output_new_ext(mf, buf, "single", tag->label); + } + db_do_stream(mf, ret->output, stream, ssrc); }