[mythtv-commits] Ticket #9904: All black/incorrect previews
MythTV
noreply at mythtv.org
Thu Jul 14 04:56:32 UTC 2011
#9904: All black/incorrect previews
----------------------------------+----------------------------
Reporter: beirdo | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: 0.25
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
----------------------------------+----------------------------
Changes (by Github):
* status: new => closed
* resolution: => fixed
* milestone: unknown => 0.25
Comment:
Fixed preview generation (at least for my case)
Fixes #9904
This was a death by many papercuts
1) seeking to the end of file seems to miss the last entry in the
recordedseek
table. I left this as is.
2) seeking to the end of file does a linear search to find the frame. The
one
thing I changed here was to make it actually fast-forward to the last
known
frame position before starting the search. In the preview case, it was
doing a linear search from frame 0 to the last frame in the file, which
took
longer than the timeout period. This fixed the timeouts by jumping as
far
as we can first.
3) we were seeking to the end of the file due to a uint64 overflow caused
by
doing an unqualified "frame - 1" even if frame was 0. The MAX_UINT64
value
was then capped to the last frame number pre-seek. I changed this to
only
subtract 1 if the value wasn't 0, and to use 0 if it was 0.
4) we were asking for position 0 as the logic in the previewgenerator told
it
to. if the value was 0 (which it always is on remote previews!), the
code
fell through to ask for frame 0 (which then got buggered by the above
problems). I changed the logic such that it would instead seek to 1/3
into
the program as we originally desired.
Caveat: I do not yet know how this will act with a recording in progress,
however we do rebuild a preview (AFAIK) when the show finishes recording.
I also don't know how the code changed such that this started happening,
but
whatever. It seems to be fixed again.
Branch: master
Changeset: 57b2cddc4d52a4231e1d441b510131e4090e68d9
--
Ticket URL: <http://code.mythtv.org/trac/ticket/9904#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list