<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=ks_c_5601-1987"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:±¼¸²;
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:±¼¸²;
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:"¸¼Àº °íµñ";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:"\@¸¼Àº °íµñ";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:"\@±¼¸²";
panose-1:2 11 6 0 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-autospace:none;
word-break:break-hangul;
font-size:10.0pt;
font-family:"¸¼Àº °íµñ";}
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-compose;
font-family:"¸¼Àº °íµñ";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"¸¼Àº °íµñ";}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></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=KO link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi All!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I am new ffmpeg user and english.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Recently I decodes H.264 stream from IP camera using FFMpeg which the latest ver 54(libavcodec) and binary file(dll) on Window.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Whenever I decoded sample file which is avcodec_sample.cpp using avcodec_decode_video2( ), I always received the return value -1.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I referenced your comment(<a href="http://www.mail-archive.com/libav-user@mplayerhq.hu/msg04939.html">http://www.mail-archive.com/libav-user@mplayerhq.hu/msg04939.html</a>), but my return value is 1 and gop_picture is 0.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I don</span>¡¯<span lang=EN-US>t know How do I solve the problem?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Are you help me?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Nam<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>PS: I can decode previous version(52) using avcodec_decode_video( ), but can</span>¡¯<span lang=EN-US>t decode H.264 stream using avcodec_decode_video2( ).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I thought that av_packet_init() is necessary to initialize to decode as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> int64_t tmp = 0x8000000000000000; //AV_NOPTS_VALUE<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.pts = tmp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.dts = tmp; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.pos = -1; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.duration = 0; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.stream_index = 0; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.destruct = NULL;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.priv = NULL;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.side_data = NULL;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.side_data_elems = 0;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.convergence_duration = 0;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.flags = AV_PKT_FLAG_KEY; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.data = NULL;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> avpkt.size = 0;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>After seeing the h264.c source, there is not use the avpkt structure except avpkt.data and avpkt.size.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Another problem is happen to me</span>¡¦<span lang=EN-US>.Help Help</span>¡¦<span lang=EN-US>!!!!!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>