rtsp: request keyframe exactly once

This commit is contained in:
Kamil Trzcinski 2023-02-24 21:52:05 +01:00
parent 49c7d01789
commit a8a3e4242b

View File

@ -70,20 +70,15 @@ public:
return; // we're not ready for the data yet
}
if (buf->flags.is_keyframe) {
fHadKeyFrame = true;
}
if (!fRequestedKeyFrame) {
if (!fHadKeyFrame) {
printf("device_video_force_key: %p\n", this);
device_video_force_key(buf->buf_list->dev);
fHadKeyFrame = buf->flags.is_keyframe;
}
if (!fHadKeyFrame) {
if (!fRequestedKeyFrame) {
device_video_force_key(buf->buf_list->dev);
fRequestedKeyFrame = true;
}
if (!fHadKeyFrame) {
return;
}