<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><blockquote type="cite">The right place to be scheduling a new 'playing' task is in your <br>'after playing' function - i.e., the function that you passed as a <br>parameter when you called "startPlaying()" on your "FileSink" <br>subclass.  That 'after playing' function will get called,<br> automatically, when writes to the file fail (or if the input stream <br>closes) - as a result of the call to "onSourceClosure(this);".  So <br>that's where you should be scheduling your new task.<br></blockquote><br>Initially we were scheduling in afterPlaying function, but your suggestion of<br>reordering sets fAfterFunc to NULL in MediaSink::stopPlaying() before it gets<br>called in MediaSink::onSourceClosure().<br>We think the correct behavior would be to call stopGettingFrames on fSource<br></blockquote><div><br></div>Yes, I agree.  In the next version of the software, this piece of code - in "FileSink::afterGettingFrame()" - will become:</div><div><br></div><div><div>  if (fOutFid == NULL || fflush(fOutFid) == EOF) {</div><div>    // The output file has closed.  Handle this the same way as if the input source had closed:</div><div>    if (fSource != NULL) fSource->stopGettingFrames();</div><div>    onSourceClosure(this);</div><div>    return;</div><div>  }</div></div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>