[Libav-user] avcodec_open2 error -542398533 "Generic error in an external library"

Gonzalo ggarra13 at gmail.com
Thu Mar 24 12:33:47 CET 2016



El 24/03/16 a las 03:03, Yu Ang Tan escribiĆ³:
>
> // allocate context
> pFormatCtx = avformat_alloc_context();
> pFormatCtx->oformat = pOutFormat;
> memcpy(pFormatCtx->filename,filename,
> min(strlen(filename), sizeof(pFormatCtx->filename)));
Here you are trashing memory.  You need to allocate pFormatCtx->filename 
(or use something like strdup).


-- 
Gonzalo GarramuƱo
ggarra13 at gmail.com

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


More information about the Libav-user mailing list