Combined patch from mythtv ticket #12308