From: Carlos R. <car...@ma...> - 2004-12-08 22:18:09
|
Miguel Freitas wrote: >pretty fishy indeed... i guess you know as much as i do (btw, i wrote >the xv_restore_port_attributes). the code looks correct and it was >supposed to work but it doesn't. voodoo? ;-) > >just a wild guess: try adding > > XSync(this->display, False); > >after restoring all the settings. > > Bingo! That did it. Meanwhile I had already forced it to work by adding the below commented line: #----------------------------- printf("\trestoring %s = %d\n", attr->name, attr->value); XLockDisplay(this->display); atom = XInternAtom (this->display, attr->name, False); XvSetPortAttribute (this->display, this->xv_port, atom, attr->value); /* XvGetPortAttribute (this->display, this->xv_port, atom, &attr->value);*/ XUnlockDisplay(this->display); printf("\treread %s = %d\n", attr->name, attr->value); #----------------------------- But XSync is better indeed. A patch follows. Carlos Rodrigues -- url: http://tudo-sobre-nada.blogspot.com |