Opened 7 years ago

Closed 17 months ago

#12828 closed Bug Report - General (Trac EOL)

Frontend Makes Multiple Refresh Rate Changes in Switch to LiveTV

Reported by: hpx@… Owned by: Mark Kendall
Priority: minor Milestone: 32.0
Component: MythTV - Video Playback Version: 0.28.0
Severity: medium Keywords:
Cc: Ticket locked: no


For some time now I have had issues with respect to refresh rate switching and video playback. In the most recent version, the frontend does (eventually) select the correct refresh rate, but the late mode switch causes playback & A/V sync issues.

I've attached a frontend log that shows the problem. DisplayRes::SwitchToVideo?() is being called twice when starting LiveTV, the first time it is called is before the tuning takes place, it appears to be called with target_rate = 0 and next.RefreshRate? = 25.0. As a result, DisplayResScreen::FindBestMatch? comes back with a best refresh rate match of 24Hz and sets my display to 1920x1080 24Hz. This is not good, as the frame rate of my LiveTV is not even close to this (nor is it close to a multiple of this)

After the tuning completes, DisplayRes::SwitchToVideo?() is called again, but this time next.RefreshRate?() = 59.9401. This causes DisplayResScreen::FindBestMatch? to return with a best match of 1920x1080 60Hz and changes my displays refresh rate again.

The problem is this 2nd change, although correct, seems to come too late in the process, or takes to long, whatever the case playback stutters and A/V sync is off by more than a second. I noticed that force-setting a refresh rate of 60Hz instead of Auto fixes the live TV problem, but then videos that should play at 24Hz play at 60Hz instead, which causes some very very minor issues with their playback.

As a hack, I added the following to DisplayRes::SwitchToVideo?() to force the first refresh rate change to change to the proper rate for my LiveTV:

    if ((int) next.RefreshRate() == 25)

As a result, the 2nd switch is skipped (based on the code) and both LiveTV playback and Video playback of 24p content work properly.

I'm entering this as a bug report rather then a patch because I don't know the "right" way of fixing this. I have no idea where that "25" value is coming from or how it is being arrived at but it seems to be at the root of the problem

Attachments (2)

frontendlog.txt (2.9 KB) - added by hpx@… 7 years ago.
Frontend Log with some extra debugging output
version.txt (865 bytes) - added by hpx@… 7 years ago.
Version Information

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by hpx@…

Attachment: frontendlog.txt added

Frontend Log with some extra debugging output

Changed 7 years ago by hpx@…

Attachment: version.txt added

Version Information

comment:1 Changed 4 years ago by Mark Kendall

Milestone: unknown31.0
Owner: changed from JYA to Mark Kendall
Status: newaccepted

comment:2 Changed 4 years ago by Mark Kendall

Milestone: 31.032.0

comment:3 Changed 17 months ago by Stuart Auchterlonie

Resolution: Trac EOL
Status: acceptedclosed

We have moved all bug tracking to github [1]

If you continue to have this issue, please open a new issue at github, referencing this ticket.

[1] -

Note: See TracTickets for help on using tickets.