Opened 14 years ago
Closed 13 years ago
#3542 closed defect (fixed)
Stuttering playback due to bad refresh rate detection.
Reported by: | anonymous | Owned by: | Nigel |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | playback refresh rate |
Cc: | Ticket locked: | no |
Description
Some video drivers like Openchrome in VBE mode can return modelines with only zeros. This causes a divide by zero in the refresh rate calculation in videoout_xv.cpp and the playback part tries to use NaN as reference. This results in stuttering, unwatchable playback.
The patch checks if there will be a divide by zero and defaults to 60Hz if this is the case. I checked the patch with the real refresh rate of my monitor, I'm not sure what happens if there's a difference in myth/real refresh rate. Best would be to have a more reliable way to detect the refresh rate if this value is really critical.
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | refresh-only.diff added |
---|
comment:1 Changed 14 years ago by
Owner: | changed from Isaac Richards to Nigel |
---|---|
Status: | new → assigned |
Thanks for the patch, XXXXXXX. I have simplified your patch slightly (pre-store the multiplication, maybe faster if the compiler doesn't already optimise it):
- double rate = (double)((double)(dot_clock * 1000.0) / - (double)(mode_line.htotal * mode_line.vtotal)); + double rate = mode_line.htotal * mode_line.vtotal; + // See if there's valid data to prevent a divide by zero. + if (rate > 0) + rate = (dot_clock * 1000.0) / rate;
Assuming this doesn't cause new bugs, will commit in a day or two.
comment:2 Changed 14 years ago by
Sorry, that was meant to be "Thanks for the patch, Christiaan" :-)
Patch to fix refresh rate detection.