<div>Hi,</div><div> </div><div>I have a multi threaded video application using x264 and ffmpeg. In the decoding flow, I have a question on av_parser_parse2. </div><div> </div><div>I use it as below.</div><div> </div><div><font color="#0000ff"><font color="#0000ff">int</font></font><font> len = 0;</font></div>
<div><font>

<p>                               len = av_parser_parse2(m_pDecoderParserContext,m_pCodecCtx,&avpkt.data,&avpkt.size,in_buf, in_buf_size,0,0,0);</p><p> </p><p>Here I get the return value len = in_buf_size. But the avpkt.data is not getting filled in. It gets zero, so is the avpkt.size</p>
<p>To check if the error is due to the usage of AVPacket, I changed it to </p><p> </p><p>uint8_t* pOutBuf = new uint8_t[50000];</p><p>memset(pOutBuf,5,50000);</p><p>int iOutSize = 100;</p><p>len = av_parser_parse2(m_pDecoderParserContext,m_pCodecCtx,&pOutBuf,&iOutSize_buf, in_buf_size,0,0,0);</p>
<p> </p></font></div><div>Here, av_parser_parse2 changed the '5' returned to all the pOutBuf locations to zero and the output size varable also got set as 0.  I tried a uint8_t pointer without any memory allocated as well.</div>
<div> </div><div>Nothing gives me  a valid output pointer, but in all cases, the parsing happens for the entire input variable ( as indicated by the return value of the function).</div><div> </div><div>Could any of you please give me more information on this?</div>
<div> </div><div>Thanks in advance,</div><div>Shiju</div>