<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div>>And issue is probably withing avi container as it<br clear="none">>may not add every frame into index table.<br clear="none">>And when seeking you never check if returned packet actually is right<br clear="none">>one that you need.<br clear="none">><br clear="none">>Or it could be bug in your code how you seek in file, etc...</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">I did a rewrite of my code and it now works.  But I don't know
 why.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">I modified the demuxing.c example so that it seeks to frame 0, calls</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">decode_packet, seeks to frame 10, calls decode_packet, etc.  I</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">seek to every 10th frame and call decode_packet().  I also</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style:
 normal;">modified decode_packet() so that it writes an output file whenever <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">'got_frame' is non-zero.  For the first four seeks (frame 0, 10, 20, 30),</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">'got_frame' is NULL and no output image files are written.  Then,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">when I seek to frame 40, the output file for frame 0 is written.  When I seek to</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
 HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">60, the output for frame 10 is written.  When I seek to frame 60, the output</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">for frame 20 is written, etc.  Eventually, the 'flush cached frames' loop is</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">entered and the final files are written.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px;
 font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">Does this make sense or sound familiar to anyone?  What is happening here?<br>Does this have anything to do with cached frames?  I've before what 'cached</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">frames' are but nobody answered.  Does anyone understand this?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">Also, none of the
 above oddness happens if I use AVI files encoded with <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">no codec or with lossless JPEG, or a few other codecs.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida
 Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Wednesday, October 16, 2013 3:48 PM, Paul B Mahol <onemda@gmail.com> wrote:<br> </font> </div>  <div class="y_msg_container">On 10/16/13, Paul B Mahol <<a shape="rect" ymailto="mailto:onemda@gmail.com" href="mailto:onemda@gmail.com">onemda@gmail.com</a>> wrote:<br clear="none">> On 10/16/13, James Board <<a shape="rect" ymailto="mailto:jpboard2@yahoo.com" href="mailto:jpboard2@yahoo.com">jpboard2@yahoo.com</a>> wrote:<br clear="none">>>>Why don't you simply test this yourself?<br clear="none">>>>It cannot take more time to test than to write your<br clear="none">>>>mail, let alone write (and read!) the answers.<br clear="none">>><br clear="none">>> I did.  It generated the extra frames.  So the libav implementation<br clear="none">>> works this way.  Or at least my code works that way,
 and my code<br clear="none">>> might be screwed.  The question I mean to ask (maybe I wasn't clear)<br clear="none">>> is whether there is anything fundamental to the huffyuv algorithm<br clear="none">>> which prevents me from decoding a single frame.  If the answer<br clear="none">>> is 'yes', then I know not to dig through the source code (big<br clear="none">>> learning curve) because that effort can't possibly work.  If<br clear="none">>> the answer is 'no, then I'll press on.<br clear="none">><br clear="none">> There is nothing in huffyuv algorithm and ffvhuff which could cause this.<br clear="none">><br clear="none"><br clear="none">And issue is probably withing avi container as it<br clear="none">may not add every frame into index table.<br clear="none">And when seeking you never check if returned packet actually is right<br clear="none">one that you need.<br clear="none"><br
 clear="none">Or it could be bug in your code how you seek in file, etc...<div class="yqt9443626572" id="yqtfd11768"><br clear="none">_______________________________________________<br clear="none">Libav-user mailing list<br clear="none"><a shape="rect" ymailto="mailto:Libav-user@ffmpeg.org" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br clear="none"><a shape="rect" href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>