X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fdecklink_output.cpp;fp=nageru%2Fdecklink_output.cpp;h=5cf3abf5f391f6c301e51f6378256aad87cae8a4;hb=a823a1f7d9f454913044ff8e0e17acbc73f86316;hp=fc8de57db9172f3071f140017102e30ea3f2df0f;hpb=9c1ba559ab99bcf3198ca3c0776566af49d0fab3;p=nageru diff --git a/nageru/decklink_output.cpp b/nageru/decklink_output.cpp index fc8de57..5cf3abf 100644 --- a/nageru/decklink_output.cpp +++ b/nageru/decklink_output.cpp @@ -501,8 +501,8 @@ HRESULT DeckLinkOutput::ScheduledFrameCompleted(/* in */ IDeckLinkVideoFrame *co { lock_guard lock(frame_queue_mutex); frame_freelist.push(unique_ptr(frame)); - assert(scheduled_frames.front() == frame); - scheduled_frames.pop_front(); + assert(scheduled_frames.count(frame)); + scheduled_frames.erase(frame); --metric_decklink_output_inflight_frames; } @@ -600,7 +600,7 @@ void DeckLinkOutput::present_thread_func() HRESULT res = output->ScheduleVideoFrame(frame.get(), pts, duration, TIMEBASE); lock_guard lock(frame_queue_mutex); if (res == S_OK) { - scheduled_frames.push_back(frame.release()); // Owned by the driver now. + scheduled_frames.insert(frame.release()); // Owned by the driver now. ++metric_decklink_output_inflight_frames; } else { fprintf(stderr, "Could not schedule video frame! (error=0x%08x)\n", res);