<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:新細明體;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@新細明體";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"新細明體","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-TW link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>Dear Libav:<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>I don't understand how to let the follow thing work.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#E36C0A'>You need to read
comment for AVCodecContext::get_buffer2<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US
style='color:#E36C0A'>You set this handler to allocate AVFrame memory instead
of default handler.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";
color:#1F497D'>But now , I use a new thread to memcpy the data of AVFrame.
Cause memory copy data  is implement on the other thread (different from decode),
So it can solve my problem now.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#333333'>Best Regards,<o:p></o:p></span></p>

<p class=MsoNormal><b><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#333333'>Antony Lin<o:p></o:p></span></b></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> libav-user-bounces@ffmpeg.org
[mailto:libav-user-bounces@ffmpeg.org] <b>On Behalf Of </b>Anton Shekhovtsov<br>
<b>Sent:</b> Thursday, February 05, 2015 6:24 PM<br>
<b>To:</b> This list is about using libavcodec, libavformat, libavutil,
libavdevice and libavfilter.<br>
<b>Subject:</b> Re: [Libav-user] How to allocate memory to store the image data
(when use av_frame_alloc) ?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US>2015-02-05 10:52 GMT+02:00 </span>林其益<span
lang=EN-US> <<a href="mailto:antony.lin@topviewcorp.com" target="_blank">antony.lin@topviewcorp.com</a>>:<o:p></o:p></span></p>

<div>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>Dear Libav:<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>...<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>  2. Could I allocate my own memory to the data[] array to
AVFrame (not allocate by the ffmpeg library)?<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>......<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#333333'>Best
Regards,</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#333333'>Antony Lin</span></b><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><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><o:p></o:p></span></p>

</div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

</div>

<div>

<p class=MsoNormal><span lang=EN-US>You need to read comment for
AVCodecContext::get_buffer2<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>You set this
handler to allocate AVFrame memory instead of default handler.<o:p></o:p></span></p>

</div>

</div>

</div>

</body>

</html>