fix(api): fix plugin error
This commit is contained in:
parent
6b561733c0
commit
cda6024a3e
|
@ -283,13 +283,14 @@ api::StreamData Processor::GetStreamData(const Stream &stream) {
|
||||||
if (out != nullptr) {
|
if (out != nullptr) {
|
||||||
auto output = Object::Cast<ObjMat>(out);
|
auto output = Object::Cast<ObjMat>(out);
|
||||||
if (output != nullptr) {
|
if (output != nullptr) {
|
||||||
if (!is_enable_cd &&
|
if (!is_enable_cd) {
|
||||||
output->data &&
|
if (output->data &&
|
||||||
last_frame_id_cd == output->data->frame_id) {
|
last_frame_id_cd == output->data->frame_id) {
|
||||||
// cut the duplicate frame.
|
// cut the duplicate frame.
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
last_frame_id_cd = output->data->frame_id;
|
last_frame_id_cd = output->data->frame_id;
|
||||||
|
}
|
||||||
return obj_data(output);
|
return obj_data(output);
|
||||||
}
|
}
|
||||||
VLOG(2) << "Frame not ready now";
|
VLOG(2) << "Frame not ready now";
|
||||||
|
@ -305,23 +306,24 @@ api::StreamData Processor::GetStreamData(const Stream &stream) {
|
||||||
for (auto it : streams) {
|
for (auto it : streams) {
|
||||||
if (it.stream == stream) {
|
if (it.stream == stream) {
|
||||||
if (num == 1) {
|
if (num == 1) {
|
||||||
if (!is_enable_cd &&
|
if (!is_enable_cd) {
|
||||||
output->first_data &&
|
if (output->first_data &&
|
||||||
last_frame_id_cd == output->first_data->frame_id) {
|
last_frame_id_cd == output->first_data->frame_id) {
|
||||||
// cut the duplicate frame.
|
// cut the duplicate frame.
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
last_frame_id_cd = output->first_data->frame_id;
|
last_frame_id_cd = output->first_data->frame_id;
|
||||||
|
}
|
||||||
return obj_data_first(output);
|
return obj_data_first(output);
|
||||||
} else {
|
} else {
|
||||||
// last_frame_id_cd = output->second_data->frame_id;
|
// last_frame_id_cd = output->second_data->frame_id;
|
||||||
if (!is_enable_cd &&
|
if (!is_enable_cd) {
|
||||||
output->second_data &&
|
if (output->second_data &&
|
||||||
last_frame_id_cd_vice == output->second_data->frame_id) {
|
last_frame_id_cd_vice == output->second_data->frame_id) {
|
||||||
// cut the duplicate frame.
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
last_frame_id_cd_vice = output->second_data->frame_id;
|
last_frame_id_cd_vice = output->second_data->frame_id;
|
||||||
|
}
|
||||||
return obj_data_second(output);
|
return obj_data_second(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user