<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 11:59 AM, David Tsulaia <span dir="ltr"><<a href="mailto:d_tsulaia@cu.edu.ge" target="_blank">d_tsulaia@cu.edu.ge</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 10:52 AM, David Tsulaia <span dir="ltr"><<a href="mailto:d_tsulaia@cu.edu.ge" target="_blank">d_tsulaia@cu.edu.ge</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 28, 2015 at 3:26 AM, Carl Eugen Hoyos <span dir="ltr"><<a href="mailto:cehoyos@ag.or.at" target="_blank">cehoyos@ag.or.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>David Tsulaia <d_tsulaia@...> writes:<br>
<br>
> ffmpeg version N-75912-g624057d Copyright (c) 2000-2015<br>
<br>
</span>Please test current FFmpeg git head before reporting<br>
issues.<br>
<span><br>
> No matter what I try call to avcodec_decode_video2<br>
> results in memory leak.<br>
<br>
</span>valgrind output missing.<br>
<br>
Carl Eugen<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br></div><div class="gmail_extra"><br></div></div></div><div class="gmail_extra">I feel ashamed for coming to mailing list so unprepared.</div><div class="gmail_extra">Must have been several nights no sleep and desperation. <div><br></div><div>Now, I used current git build and showed similar results, </div><div>but I researched more and found out what was the issue:<br></div><div>It wasn't memory leak that's why valgrind constantly showed </div><div>that all heaps were freed and no leaks were possible. </div><div>The problem was that av_decode_video2 and av_interleaved_write_frame </div><div>both buffer packets for processing/reordering. Thing is the stream is so large </div><div>that both of these calls were not fast enough to deal with incoming packets </div><div>so memory usage kept climbing up.</div><div>I fixed this by using av_write_frame and provided already interleaved stream.</div><div><br></div><div>So my bad for not noticing that.</div><div><br></div><div>I have another issue I would like to get some help if possible:</div><div><br></div><div>Could you please tell me how to correctly switch between files while reading stream. </div><div>I am recording 1 hour long files from constant stream. Right now I am doing following:</div><div><br></div><div>avio_open2(&ofmt_ctx->pb, fname, AVIO_FLAG_WRITE, NULL, NULL );</div><div>after 1 hour.</div><div>avio_close(ofmt_ctx->pb);<br></div><div>make new file name</div><div>avio_open2(&ofmt_ctx->pb, new_fname, AVIO_FLAG_WRITE, NULL, NULL );<br></div><div><br></div><div>Is this right? I though of freeing context and reallocating it again, </div><div>but wanted to avoid extra tasks in reading/writing loop.</div><div><br></div><div>P.S. Happy holidays everyone.</div></div></div></blockquote><div> </div></div></div></div>P.S. one huge thing I forgot to mention, after recording stream for 24 (+1 or 2) hours</div><div class="gmail_extra"> or so the new files that are created are filled with error messages (stderr stream is closed) like these:</div><div class="gmail_extra"><div class="gmail_extra">[mpegts @ 0x23121a0] Application provided invalid, non monotonically increasing </div><div class="gmail_extra">dts to muxer in stream 1: 15973397288 >= 7498497816</div><div><br></div><div>I am dumbfounded as to how can this happen. If possible please provide some clues for this.</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div></blockquote><div> </div><div><br></div><div>Just found that normal files that are working also contain some of the log.....</div><div>That is extremely wrong. </div><div><br></div></div><div class="gmail_extra">root@srv:/sto/# head /sto/20160111-15.mpg</div><div class="gmail_extra">[mpegts @ 0x2e5b9e0] Using AVStream.codec.time_base as a timebase hint to the muxer </div><div class="gmail_extra">is deprecated. Set AVStream.time_base instead.</div><div class="gmail_extra">[mpegts @ 0x2e5b9e0] Using AVStream.codec.time_base as a timebase hint to the muxer </div><div class="gmail_extra">is deprecated. Set AVStream.time_base instead.</div><div class="gmail_extra">G@BFFmpeg Service01@GP =0@G^1fUUffUUDUD"H</div></div></div>