<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 19, 2011, at 10:15 PM, pavan kumar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "> while (avpkt.size > 0) {<br><br>            len = avcodec_decode_video2(c, frame, &gotpicture, &avpkt);<br>               printf("Value of len =%d \n ",len);<br>
               if (len > 0) {<br>                fprintf(stderr, "Error while decoding frame %d, %d\n",<br>gotpicture,len);<br><br>            }<br>            if (gotpicture) {<br>                printf("Got The Picture  %d\n", gotpicture);<br>
                }<br>            avpkt.size -= len;<br>            avpkt.data += len;<br>        }<br></span></blockquote><div><br></div><div><br></div><div>You are trying to increment the size and data of the avpkt - you shouldn't be touching it, and that would not work anyway. You need to get a new packet from the stream, then call decode_video one time only on the packet's data.</div><div><br></div><div>Bruce</div></div></body></html>