[Live-devel] negative presentation time in "afterGettingFrame" sink callback

Markus Schumann markuss at sonicfoundry.com
Sun Jan 13 10:22:02 PST 2013


All,


I am getting a negative value for presentationTime.tv_sec in MySink::afterGettingFrame.
I absolute value increases (when ignoring the sign)

In the live555's custom sink sample code the timestamps (of type timeval) are getting casually casted to an unsigned.

Is it save to ignore the sign and do the cast?
What's the story for the timestamps begin negative and increasing in absolute value?


//
// used to output the 'microseconds' part of the presentation time
//
char uSecsStr[6+1];

sprintf(uSecsStr, "%06u", (unsigned) presentationTime.tv_usec);

envir()  << ".\tPresentation time: "  << (unsigned)presentationTime.tv_sec  << "." << uSecsStr;



FYI: this is a great piece of software and has been working so far flawlessly - very nice work done!

Thanks

Markus




More information about the live-devel mailing list