Greetings Luca,

> Sent: Saturday, April 25, 2015 at 12:16 PM
> From: "Luca Barbato" <lu_z...@gentoo.org>
> To: libav-api@libav.org
> Subject: Re: [libav-api] invalid AVPacket size in av_read_frame usage.
>
> On 23/04/15 15:34, daggs wrote:
> > Greetings,
> >  
> > I'm writing a program that needs to sample the screen in bgra format.
> > the problem is what I try to read an av frame, I get this error:
> > [rawvideo @ 0x1403aa0] Invalid buffer size, packet size 1228800 < expected 
> > frame_size 8294400       
> >  
> >  
> > looking at the code I see that unless stated else, 1228800 is the max len 
> > so I went on and wrote the code below:
> > if (avs->av_pkt_buff_len) {
> >    if (av_new_packet(&av_packet, avs->av_pkt_buff_len)) {
> >       ERROR("av packet with paylod size %d has failed.", 
> > avs->av_pkt_buff_len);
> >       return -1;
> >    }
> > } else
> >    av_init_packet(&av_packet);
> > 
> > and set av_pkt_buff_len to 8294400 but I still get that error.
> > 
> > any ideas what I'm doing wrong?
> 
> We'd need to see more code.
> 
> lu
the code uses callbacks which uses av_packet, as I don't want to pollute the 
mailing list by posting the entire code, can you pinpoint me to what code 
should I post? 
_______________________________________________
libav-api mailing list
libav-api@libav.org
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to