[mythtv] Transcode first/last frame problem [patch to v0.19]
Andrew M. Bishop
amb at gedanken.demon.co.uk
Thu May 11 08:03:23 UTC 2006
One of the problems with mythtranscode is that even when the cutlist
specifies that the first and last frames are to be cut out they appear
in the output.
If the cut list is "0-x,y-end" where 'x' and 'y' are arbitrary and
'end' is the last frame in the recording (e.g. if only transcoding a
section from the middle) then the first and the last frames still
appear in the transcode output.
The patch for this is in NuppelVideoPlayer.cpp and makes sure that if
the first or last frame are cut then they are not output.
-------------------- NuppelVideoPlayer.cpp patch --------------------
diff -u NuppelVideoPlayer.orig.cpp NuppelVideoPlayer.cpp
--- NuppelVideoPlayer.orig.cpp 2006-05-11 08:55:40.000000000 +0100
+++ NuppelVideoPlayer.cpp 2006-05-11 08:52:40.000000000 +0100
@@ -4346,7 +4346,8 @@
if (honorCutList && (!deleteMap.isEmpty()))
{
- if (videoOutput->GetLastDecodedFrame()->frameNumber >= dm_iter.key())
+ if (videoOutput->GetLastDecodedFrame()->frameNumber >= dm_iter.key() ||
+ (videoOutput->GetLastDecodedFrame()->frameNumber == -1 && dm_iter.key() == 0))
{
while((dm_iter.data() == 1) && (dm_iter != deleteMap.end()))
{
@@ -4355,6 +4356,8 @@
dm_iter++;
msg += QString(" to %1").arg((int)dm_iter.key());
VERBOSE(VB_GENERAL, msg);
+ if(dm_iter.key() == GetTotalFrameCount())
+ return false;
GetDecoder()->DoFastForward(dm_iter.key());
GetDecoder()->ClearStoredData();
ClearAfterSeek();
-------------------- NuppelVideoPlayer.cpp patch --------------------
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop amb at gedanken.demon.co.uk
http://www.gedanken.demon.co.uk/
More information about the mythtv-dev
mailing list