[Live-devel] StreamParser and EOF

Andreas Färber faerber at pi4.informatik.uni-mannheim.de
Wed Mar 19 06:54:39 PDT 2008


Am 19.03.2008 um 14:22 schrieb Ross Finlayson:

>> I am working on a StreamParser subclass and am wondering how the end-
>> of-file is supposed to be handled.
>
> This is specified by the parameters "onInputCloseFunc" and
> "onInputCloseClientData" that are passed to the "StreamParser"
> constructor (in the code for the subclass's constructor).  Usually
> (as you can see in the provided example subclasses
> "AC3AudioStreamParser", "H263plusVideoStreamParser",
> "MPEG1or2AudioStreamParser", and "MPEGVideoStreamParser"),
> "FramedSource::handleClosure" is passed as "onInputCloseFunc", and
> the source object that's using the parser is passed as
> "onInputCloseClientData".  This means that end-of-file will be
> handled exactly the same as if the source object ran out of data,
> without using a parser.

Thanks for the explanation. My problem is elsewhere, I am getting said  
issue with test4Bytes' ensureValidBytes(4), three bytes before the end  
of file is reached. I am therefore observing an exit(1) call, which  
happens before handleClosure. I'll have to debug some more... ;-)

Andreas


More information about the live-devel mailing list