[mythtv] [PATCH] Partial fix for mythtranscode segfault

Geoffrey Hausheer ou401cru02 at sneakemail.com
Mon Dec 1 17:30:54 EST 2003


I have tracked down the mythtranscode segfault to a problem in the
avdecoder fast-forward code.  Specifically, after a fast-forward, under
certain conditions, the timecode gets set to '0' which really hoses up
the encoder.

I haven't yet figured out where the problem is yet, but I will work on
that next.  For the time-being, the following patch shoul gaurantee
monotonically increasing timecodes, and prevent the segfault.

While this doesn't fix the cause of the problem, I think it is still a
good safegaurd, and would like it committed regardless.

Thanks,
.Geoff

Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp,v
retrieving revision 1.298
diff -r1.298 NuppelVideoPlayer.cpp
2890a2891
>     framesPlayed = 0;
2947d2947
< 
2966a2967
>     long lasttimecode = 0;
3000a3002,3004
>         if(frame.timecode < lasttimecode)
>           frame.timecode = lasttimecode + vidFrameTime;
>         lasttimecode = frame.timecode;


More information about the mythtv-dev mailing list