Ticket #2954: picture-attribute-fix.patch

File picture-attribute-fix.patch, 531 bytes (added by danielk, 19 years ago)

Fix for picture attribute problem

  • libs/libmythtv/channel.cpp

     
    11201120        return -1;
    11211121    }
    11221122
    1123     return (int)(65535.0 / (qctrl.maximum - qctrl.minimum) * ctrl.value);
     1123    float mult = 65535.0 / (qctrl.maximum - qctrl.minimum);
     1124    return min(max((int)(mult * (ctrl.value - qctrl.minimum)), 0), 65525);
    11241125}
    11251126
    11261127static int get_v4l1_attribute_value(int videofd, int v4l2_attrib)