[Live-devel] Am I doing this right?

Ross Finlayson finlayson at live555.com
Thu Apr 6 14:48:09 PDT 2017


> A bit more details on the crash I'm encountering. First, it's not really a "crash" in that the server dies. It appears to be a C++ exception that is being fired and handled somewhere

It’s not just “not really” a crash; it’s not even close to a crash.  A C++ exception is *not* an error of any kind; it’s simply a part of the C++ language, just like an “if” or a “switch” statement.  Our code uses this (C++ language exception) to handle parsing of stream data (in your case, H.264 video).

“Nothing to see here; move along.”


> I assume there's something wrong somewhere. This makes me suspicious of the fact I am NOT prepending the NAL units with 0x0 0x0 0x0 0x1 as you described.

Huh?  I’ve already told you that - when you’re feeding H.264 data to a downstream “H264VideoStreamFramer” - this data MUST have a start code in front of each NAL unit.  So why are you arguing about this?  I’ve already told you what needs to be done.


(If, instead, your upstream object (“OCVFileSource”) were to deliver *discrete* NAL units - i.e., one at a time, for each call to “doGetNextFrame” - then you would feed it instead to a “H264VideoStreamDiscreteFramer”, and each NAL unit would *not* begin with a ‘start code’.  But because you’re using “x264”, which (I assume) delivers groups of NAL units, each prepended with a start code, then feeding this to a “H264VideoStreamFramer” (with the start codes) is the right thing to do.)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list