<div>Hi Dan,</div><div><br></div><div>I found out that the commit e33dedb46c0e4786023e1fe0a618e3f4a35728ae (Improve stop handling in mlt_consumer) </div><div>has a side effect to eof behaviour (see ticket <a href="http://www.kdenlive.org/mantis/view.php?id=2870">http://www.kdenlive.org/mantis/view.php?id=2870</a>).</div>
<div><br></div><div>I can reproduce the hanging on reaching eof in mlt. The crazy sound is only reproducable in kdenlive.</div><div><br></div><div>steps to reproduce:</div><div><br></div><div>bash# MLT_CONSUMER=sdl_preview melt movie.mov => on reaching eof ---> hanging and melt has to be killed </div>
<div><br></div><div>I guess there is a deadlock or so.</div><div><br></div><div>mlt_consumer.c:</div><div><br></div><div>/** Stop the consumer.</div><div> *</div><div> * \public \memberof mlt_consumer_s</div><div> * \param self a consumer</div>
<div> * \return true if there was an error</div><div> */</div><div><br></div><div>int mlt_consumer_stop( mlt_consumer self )</div><div>{</div><div><span class="" style="white-space:pre">    </span>// Return error if supplied invalid or stopped consumer.</div>
<div><span class="" style="white-space:pre">    </span>if ( !self /*|| mlt_consumer_is_stopped( self )*/ ) <= Look at commment</div><div><span class="" style="white-space:pre">         </span>return -1;</div><div><br></div><div>
I commented the check mlt_consumer_is_stopped( self ) => works again.</div><div><br></div><div>I think there are conditions where the consumer says I'm "stopped" but forcing/calling the  mlt_consumer_stop function is</div>
<div>needed in some circumstances for example pthread_cond_broadcasting or what ever. I think you know it better!</div><div><br></div><div>Sorry I don't have to much time now for deeper investigation. I hope my hints are enough for a solution.</div>
<div><br></div><div>regards</div><div><br></div><div>eddrog </div><div> </div><div><br></div><div><br></div>