X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=pbo_frame_allocator.cpp;h=370fa3d1ea7e145ce1f0e5dee54a2e7610a0f040;hb=48b36c4de497551baedc533cd2ef37e402dc2fb3;hp=e1106334be7fc7c209ae431f19260052e1444eee;hpb=05b0c5b2b693ba809b8334a892463ae34febb6c3;p=nageru diff --git a/pbo_frame_allocator.cpp b/pbo_frame_allocator.cpp index e110633..370fa3d 100644 --- a/pbo_frame_allocator.cpp +++ b/pbo_frame_allocator.cpp @@ -43,6 +43,7 @@ PBOFrameAllocator::PBOFrameAllocator(size_t frame_size, GLuint width, GLuint hei userdata[i].last_height[0] = height; userdata[i].last_width[1] = 0; userdata[i].last_height[1] = 0; + userdata[i].last_interlaced = false; for (unsigned field = 0; field < 2; ++field) { glBindTexture(GL_TEXTURE_2D, userdata[i].tex_y[field]); check_error(); @@ -105,7 +106,7 @@ FrameAllocator::Frame PBOFrameAllocator::alloc_frame() { Frame vf; - std::unique_lock lock(freelist_mutex); // Meh. + unique_lock lock(freelist_mutex); // Meh. if (freelist.empty()) { printf("Frame overrun (no more spare PBO frames), dropping frame!\n"); } else { @@ -124,7 +125,7 @@ void PBOFrameAllocator::release_frame(Frame frame) printf("%d bytes overflow after last (PBO) frame\n", int(frame.overflow)); } - std::unique_lock lock(freelist_mutex); + unique_lock lock(freelist_mutex); freelist.push(frame); //--sumsum; }