<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 9:22 PM, Paul B Mahol <span dir="ltr"><<a href="mailto:onemda@gmail.com" target="_blank">onemda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On 12/5/13, Bruce Wheaton <<a href="mailto:bruce@spearmorgan.com">bruce@spearmorgan.com</a>> wrote:<br>
> On Dec 5, 2013, at 3:41 AM, Paul B Mahol <<a href="mailto:onemda@gmail.com">onemda@gmail.com</a>> wrote:<br>
><br>
>> On 12/5/13, Eric Beuque <<a href="mailto:eric.beuque@gmail.com">eric.beuque@gmail.com</a>> wrote:<br>
>>> How i can tell libavcodec that i want to become the owner of the data<br>
>>> and<br>
>>> be able to free it, to without codec context instance? I was thinking<br>
>>> about<br>
>>> using get/release_buffer functions, but i don't know how to compute size<br>
>>> of<br>
>>> the data.<br>
>>><br>
>>> Is data memcpy the only way to do this?<br>
>>><br>
>>> Note, that i also can't upgrade to new version of FFMPEG.<br>
>>><br>
>>> Thanks for your help.<br>
>>><br>
>><br>
>> Use reference counting system.<br>
>> They you need to manually free frame once you will not need it<br>
>> (otherwise you leak memory), so you do not need to do copy.<br>
><br>
><br>
> In my recent experiments, it seemed that closing the codec actually frees<br>
> all buffers, regardless of reference count. That makes sense - if the codec<br>
> is gone, what would detect the decreased reference count?<br>
<br>
</div>That sound wrong to me, either when decoding or encoding frames should<br>
not be freed if frame is still used.<br></blockquote><div><br></div><div>I agree with Paul. I think this is the expected behavior for developers.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5"><br>
><br>
> Bruce<br>
> _______________________________________________<br>
> Libav-user mailing list<br>
> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
> <a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
><br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br><br><br></div></div>