<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello,<div><br></div><div>I was using libavformat to stream live using the HLS formatter. It works very well until the point where my application is exiting. On exit I call "hls_write_trailer", the final ".ts" file exists but when the ".m3u8" file is updated I see an invalid file name as shown in the attachment below.</div><div><br></div><div>I looked over the code in "hlsenc.c". When the call to <span style="font-size: 12pt;">hls_write_trailer is made it calls avformat_free_context(oc), where oc = </span><span style="text-indent: -53px; line-height: 13px; white-space: pre-wrap; background-color: rgb(251, 252, 253);"><font size="3">hls->avf. </font></span></div><div><span style="text-indent: -53px; line-height: 13px; white-space: pre-wrap; background-color: rgb(251, 252, 253);"><font size="3">After this call "hls_append_segment" is called which uses hls->avf->filename. I am guessing this causes the invalid file name to appear. If my analysis is wrong (I did not actually step through a </font></span></div><div><span style="text-indent: -53px; line-height: 13px; white-space: pre-wrap; background-color: rgb(251, 252, 253);"><font size="3"><br></font></span></div><div><span style="text-indent: -53px; line-height: 13px; white-space: pre-wrap; background-color: rgb(251, 252, 253);"><font size="3">debugger) I apologize for wasting your time. In that case please point me in the right direction. If not then will there be a fix soon?</font></span></div><div><span style="text-indent: -53px; line-height: 13px; white-space: pre-wrap; background-color: rgb(251, 252, 253);"><font size="3"><br></font></span></div><div><span style="text-indent: -53px; line-height: 13px; white-space: pre-wrap; background-color: rgb(251, 252, 253);"><font size="3">Thanks</font></span></div><div><br></div><div id="inlineImage0" style="display: inline-block"><script type="jsv#1318_"></script> <span contenteditable="true"> </span> <div style="display: inline-block" unselectable="on" contenteditable="false" class="inlineImage" initheight="203" initwidth="929"><img src="cid:inlineImage0" height="203" width="929"></div> <span contenteditable="true"> </span><script type="jsv/1318_"></script></div><div><div style="display: inline-block"><span contenteditable="true"><br></span></div></div><div><div style="display: inline-block"><span contenteditable="true"><br></span></div></div><div><div style="display: inline-block"><span contenteditable="true"><br></span></div></div> </div></body>
</html>