> On Feb 2, 2018, at 7:26 AM, Joshua Hitchen <[email protected]> wrote:
>
> In the constructor for the ByteStreamMultiFileSource, to determine the number
> of sources you iterate fNumSources until the value pointed to by
> fileNameArray[fNumSources] is NULL, but there is no guarantee that the stored
> value after the pointer to the final file name pointer in the array will be
> null.
Yes, there is such a guarantee - because that’s how the input to
“ByteStreamMultiFileSource::createNew()" is *defined*. See the comment at line
33 of “liveMedia/include/ByteStreamMultiFileSource.hh”:
// A 'filename' of NULL indicates the end of the array
In other words, the input parameter “fileNameArray” is required to have a NULL
at the end.
> Input File Names:
> File Index 0: test 0.ext
> File Index 1: test 1.ext
> File Index 2: test 2.ext
> File Index 3: test 3.ext
> Actual number of files: 4
> My Method result: 4
> ByteStreamMultiFileSource.cpp Method's result: 9
This makes no sense.
There is no bug in the current code, so it will not be changed. (In the next
release of the code, I will, however, change the comments near the beginning of
"include/ByteStreamMultiFileSource.hh” and “ByteStreamMultiFileSource.cpp” to
explain even more clearly the requirements of the input “fileNameArray”
parameter.)
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel