<div dir="ltr"><div class="gmail_quote">On Wed, Jul 27, 2011 at 10:27, כרמל מגן <span dir="ltr"><<a href="mailto:carmel.work@gmail.com">carmel.work@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">
<div dir="rtl"><div style="direction:ltr">av_read_frame does not return until the third frame arrives. This introduces 2 frames delay <u>before</u> the decoding.</div><div></div></div></blockquote><div> <br>What do you mean "av_read_frame does not return"? <br>
<br>from avformat.h:<br> * This function returns what is stored in the file, and does not validate<br> * that what is there are valid frames for the decoder. It will split what is<br>...<br> * @return 0 if OK, < 0 on error or end of file<br>
<br>So, does it return negative number? Or the packet is not a video packet? Maybe, you have the first video packet spliced into three network packets? Note that the first video frame is large (it is a key frame, naturally). The subsequent packet are much much smaller, becasue they encode only delta.<br>
<br>Cheers,<br>Alex<br></div></div><br></div>