On May 19, 2011, at 10:15 PM, pavan kumar wrote:

>  while (avpkt.size > 0) {
> 
>             len = avcodec_decode_video2(c, frame, &gotpicture, &avpkt);
>                printf("Value of len =%d \n ",len);
>                if (len > 0) {
>                 fprintf(stderr, "Error while decoding frame %d, %d\n",
> gotpicture,len);
> 
>             }
>             if (gotpicture) {
>                 printf("Got The Picture  %d\n", gotpicture);
>                 }
>             avpkt.size -= len;
>             avpkt.data += len;
>         }


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.

Bruce
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to