Opened 14 years ago

Closed 14 years ago

#7605 closed defect (fixed)

Jumpy DVD playback - lock contention

Reported by: john.p.harvey@… Owned by: skamithi
Priority: minor Milestone: unknown
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I have a problem playing back dvd's on a low powered system. Dual Core Atom using vdpau graphics. If the DVD's are imported and played from disk (local or network) it is fine. The playback is very jumpy and after digging around the problem is caused by locking in dvdnav between avformatdecoder & dvdringbuffer.

Both call IsInMenu? which calls into dvdnav_is_domain which does a lock. For some reason avformatdecoder fails to get the lock for up to about a second which causes the jumpy behaviour.

Just before calling that it avformatdecoder cals DVD()->CellChanged?() & DVD->InStillFrame?() which are stored in DVDRingBuffer & don't do any locking.

As a test i modified IsInMenu? to cache the state and only call dvdnav to update the cached value from methods in DVDRingBuffer that fetch new data.

Since avformatdecoder doesn't try to get a lock this seems to fix the problem but could someone confirm whether or not this change seems reasonable? If so i will submit a patch.

This doesn't really explain why avformatdecoder was being starved of the lock in dvdnav but i nothing seems to change that,(enable/disable real time threads, different sync methods, enable/disable hyperthreading). I am running on ubuntu 9.10.

I have attached the patch i am using which definately helps with the problem but may not be a good solution

Attachments (1)

patch1.txt (3.8 KB) - added by john.p.harvey@… 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by john.p.harvey@…

Attachment: patch1.txt added

comment:1 Changed 14 years ago by skamithi

Owner: changed from Janne Grunau to skamithi
Status: newassigned

comment:2 Changed 14 years ago by skamithi

(In [22901]) Refs #7605. Jumpy DVD playback. patch provided by john.p.harvey. will commit to 0.22.fixes in a week or two.

comment:3 Changed 14 years ago by anonymous

john.p.harvey, you are the man! This bug has been driving me nuts for at least a year. I've had to resort to using a stand-alone DVD player to watch rented DVDs ever since I upgraded to 0.21. I just applied your patch to the 0.22.0+fixes22594-0ubuntu1 package that comes with Ubuntu Karmic and behold, we can finally play DVDs properly again! Thank you for getting to the bottom of this issue and coming up with a fix. Live long and prosper!

comment:4 Changed 14 years ago by skamithi

Resolution: fixed
Status: assignedclosed

(In [22920]) Closes #7605. Internal DVD Player. Resolves Jumpy dvd playback on low powered systems. applies [22901] to 0.22 fixes.

Note: See TracTickets for help on using tickets.