[Libav-user] avcodec_open2 error -542398533 "Generic error in an external library"
Yu Ang Tan
isoboy at gmail.com
Tue Mar 29 14:55:35 CEST 2016
On Thu, 24 Mar 2016 at 22:41 Gonzalo <ggarra13 at gmail.com> wrote:
>
>
> 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Ʊoggarra13 at gmail.com
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
Hi Gonzalo
I don't think that's the case. AVFormatContext::filename is of type
char[1024] not char*. Therefore I cannot assign to it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160329/25dc3013/attachment.html>
More information about the Libav-user
mailing list