there is no such thing as closing osd in vdpau. you draw a video to the output surface and then draw something above it. We don't draw the video to the output_surface but show it on a different layer, so the output surface contains the old osd
you can see what happens by removing the black fill, you will always have the old osd below the new one
but now you call G2D_CMD_FILLRECT AND G2D_CMD_BITBLT each frame, right?
yes, it could be optimized with some intelligent logic, but i wasn't motivated enough to figure that out