[Libav-user] (AVStream *)av_malloc(sizeof(AVStream)) crashed the application

Wenpeng Zhou zhou.wenpeng at rdnet.fi
Tue Oct 30 12:05:02 CET 2012


Hi, 

I use 

 

AVFormatContext *ic_enc_mjpeg;

ic_enc_mjpeg = (AVFormatContext *)av_malloc(sizeof(AVFormatContext));

ic_enc_mjpeg->streams[0] = (AVStream *)av_malloc(sizeof(AVStream));

 

But 

ic_enc_mjpeg->streams[0] = (AVStream *)av_malloc(sizeof(AVStream));

crashed the application.

 

I use VC++ 2010. 

 

What is the reason?

 

Thanks!

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20121030/f60d6ebf/attachment.html>


More information about the Libav-user mailing list