Opened 8 years ago

Closed 8 years ago

#11572 closed Patch - Bug Fix (fixed)

Seeking backwards on DVDs sometimes seeks forwards

Reported by: peper03@… Owned by: stuartm
Priority: minor Milestone: 0.27
Component: MythTV - DVD Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


Trying to seek backwards on some DVDs actually causes a jump forwards. This is caused by dvdnav_absolute_time_search assuming that NAV packets will be equally spaced. If they're not, the calculated sector will be wrong and actually be ahead of the current sector.

There is already a mechanism in place to compare the playback position after a jump with the required position but this didn't work correctly when seeking backwards due to type issues.

The attached patch fixes the type issues and allows the code to keep on zeroing in on the desired position until we're within a second of it (usually only takes a single iteration).

Attachments (1)

0001-Fixed-seeking-issues-on-some-DVDs-where-for-example-.patch (4.0 KB) - added by peper03@… 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by peper03@…

comment:1 Changed 8 years ago by stuartm

Owner: set to stuartm
Status: newaccepted

comment:2 Changed 8 years ago by stuartm

Milestone: unknown0.27
Version: UnspecifiedMaster Head

comment:3 Changed 8 years ago by Richard <peper03@…>

Resolution: fixed
Status: acceptedclosed

In cb56a7e4ece6aa05fabbbc73ee6684043a270a89/mythtv:

Fixed seeking issues on some DVDs where, for example, trying to jump backwards could actually cause playback to jump forwards.

dvdnav_absolute_time_search in libdvdnav (renamed from the original dvdnav_time_search but functionally the same) uses a time offset with a start sector, which will only work if all NAV packets are equally spaced. On at least one DVD that had issues, the distance between consecutive NAV packets ranged from 96 to 457.

The existing mechanism to check whether a seek was successful and, if not, narrow in on the required time was broken when jumping backwards.

Signed-off-by: Stuart Morgan <smorgan@…>

Fixes #11572

Note: See TracTickets for help on using tickets.