[mythtv-commits] mythtv commit: r8414 by cpinkham
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Thu Dec 29 03:08:28 EST 2005
Author: cpinkham
Date: 2005-12-29 08:08:28 +0000 (Thu, 29 Dec 2005)
New Revision: 8414
Changeset: http://cvs.mythtv.org/trac/changeset/8414
Modified:
trunk/mythtv/libs/libmythtv/decoderbase.cpp
Log:
Fix a bug in Rewinding. Since the PosMapEntry position map is 1-based
instead of 0-based, we need to subtract one when calculating the lastKey
when we do a rewind. Otherwise, when we seek to the first positionmap
entry which is usually at byte 0 in the file, lastKey is set to
(1 * keyframedist) which is the wrong frame. This bug is what was causing
problems with mythcommflag that people have reported over the past few
days because the flagger trys to seek to frame 0. Because lastKey was being
set to the 2nd keyframe instead of the first, when normalframes was calculated
as "desiredFrame - framesPlayed", then normalframes ended up being negative.
When the negative normalframes was passed to SeekReset which takes an
unsigned int, AvFormatDecoder::SeekReset() would go into a very long loop
counting back down which would eventually cause the code to hit EOF and
exit with 0 breaks found.
I think the same modification should be performed in
DecoderBase::DoFastForwardSeek() as well since we are probably seeking to
the keyframe past where we want to be at, but I haven't tested this yet.
More information about the mythtv-commits
mailing list