csrc/buz/recorder.cpp
@@ -74,7 +74,16 @@ int pid = getpid(); file_path_ = dir_ + "/" + sole::uuid4().base62() + "-" + std::to_string(pid) + ".mp4"; auto ret = out_->JustWriter(in_->getStream(AVMEDIA_TYPE_VIDEO), in_->getStream(AVMEDIA_TYPE_AUDIO), file_path_.c_str()); auto v = in_->getStream(AVMEDIA_TYPE_VIDEO); if (!v){ return -2; } AVStream *a = in_->getStream(AVMEDIA_TYPE_AUDIO); if (!audio){ a = NULL; } auto ret = out_->JustWriter(v, a, file_path_.c_str()); if (ret){ logIt("start record file: %s", file_path_.c_str()); return 0;