Opened 3 years ago

#12828 new Bug Report - General

Frontend Makes Multiple Refresh Rate Changes in Switch to LiveTV

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

Description

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)
    {
        next.SetRefreshRate(60.0);
    }

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@… 3 years ago.
Frontend Log with some extra debugging output
version.txt (865 bytes) - added by hpx@… 3 years ago.
Version Information

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by hpx@…

Attachment: frontendlog.txt added

Frontend Log with some extra debugging output

Changed 3 years ago by hpx@…

Attachment: version.txt added

Version Information

Note: See TracTickets for help on using tickets.