[mythtv] Transcode bug: need help from a mythplayer expert

Paul Gardiner lists at glidos.net
Tue Aug 6 09:02:28 UTC 2013


I've finally tracked down the cause of some strange transcoding
results I've noticed for some time. I wont go into the details
of the strange result, but the cause is a problem to do with
the use of TranscodeFrameQueue. This queues frames, holding
the buffer pointers originating from VideoBuffers. Obviously
it is important that buffers, while held in the queue, aren't reused.
That is supposed to be taken care of by the main body of
transcode calling DoneDisplayingFrame only after it has finished
with a frame, but that seems to be failing during a seek. I've
verified this by saving out frame data, along with frame numbers
around a seek. I do this just before the call to DoneDisplayingFrame.
I see images from after the seek position appearing in the frames
numbered before the seek.

My guess is that during a seek, DiscardFrames is called and that's
allowing the frames to be reused, even though DoneDisplayingFrame
hasn't been called. I'd like to fix this, but I could do with some
advice on how best to do so. videobuffers.cpp mentions some special
buffering states: perhaps they could be used.

Cheers,
	Paul.


More information about the mythtv-dev mailing list