[Libav-user] trouble decoding bitstream

jpkouma jpkouma at gmail.com
Thu Sep 1 21:11:12 CEST 2011


Hi everybody,
I would like to decode the bitstream *outbuf* as it is encoded from
*enc_picture* as below:

*out_size = avcodec_encode_video(c, outbuf, outbuf_size, enc_picture);*

then decode that buffer into the frame *dec_picture*:

*packet.data = outbuf;
packet.size = out_size;
while (packet.size>0) {
	len = avcodec_decode_video2(c, dec_picture, &got_picture, &packet);
	 if (got_picture) { // Stream succesful decoded
		 printf("Decoded %d bytes", len);
	 }
	 packet.size -= len;
	 packet.data += len;	
}*

The issue is that *got_picture *is always returning 0, even though *len* is
grater than 0. The codec id is *CODEC_ID_MPEG4*. 

Thankful for any help 

-----
Les chinois disent: Rien ne sert de courir
                    ...
Non, ca c'est sert à rien du tout!
--
View this message in context: http://libav-users.943685.n4.nabble.com/trouble-decoding-bitstream-tp3784508p3784508.html
Sent from the libav-users mailing list archive at Nabble.com.


More information about the Libav-user mailing list