lavd/opengl_enc: check strings before parsing them.