[Libav-user] Error when decode first frame of h264 video file

Clément Champetier cnt at mikrosimage.eu
Tue Jan 6 13:48:38 CET 2015

Thank for your answer.

Actually the problem was that I allocate and initialize a new
AVCodecContext, like that:
*avCodecContext = avcodec_alloc_context3( avCodec);*
*avcodec_get_context_defaults3( avCodecContext, avCodec );*
*// set some values: width, height, pixel format...*

Instead of get it from the AVFormatContext:
*AVCodecContext* context = avFormatContext.streams[0]->codec;*

When I check the fileds of this new object in debug, it has some fileds
initialized to differents values. And the decoding works!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150106/e7b73ad9/attachment.html>

More information about the Libav-user mailing list