[Live-devel] StreamParser and EOF
Andreas Färber
faerber at pi4.informatik.uni-mannheim.de
Tue Mar 25 03:11:23 PDT 2008
Am 19.03.2008 um 14:54 schrieb Andreas Färber:
>
> 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... ;-)
Actually it turned out that I had forgotten to save the parse state.
After I added this, I no longer get that error.
Andreas
More information about the live-devel
mailing list