Probe hardware rate transitions and clear stale call port commands

This commit is contained in:
evgeny committed 2026-10-14 23:13:45 +02:00
1 parent 96e8f6c0ac
commit ea5ef4abc2
2 files changed
+15 -4

No files matched your search

+6 -2
View File
@@ -141,7 +141,10 @@ int call_video_port_open(uint64_t id, const struct call_video_caps *caps) {
pthread_mutex_lock(&lock);
int result = schedule();
if (!result) {
if (port.id != id) { clear_frames(); port.status = (struct call_video_port_status){0}; }
if (port.id != id) {
clear_frames(); port.status = (struct call_video_port_status){0};
port.configure = port.completed = port.resume = port.key = port.range = 0;
}
port.id = id; port.local = *caps; port.opening = 1;
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video port open requested call=%llu", (unsigned long long)id);
}
@@ -150,7 +153,8 @@ int call_video_port_open(uint64_t id, const struct call_video_caps *caps) {
void call_video_port_close(uint64_t id) {
pthread_mutex_lock(&lock);
if (port.id == id) {
clear_frames(); port.id = 0; port.opening = 1; port.configure = port.completed = 0;
clear_frames(); port.id = 0; port.opening = 1;
port.configure = port.completed = port.resume = port.key = port.range = 0;
if (port.inst) schedule();
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video port close requested call=%llu", (unsigned long long)id);
}