[Libav-user] How to set AVInputFormat when using AVCodec (For Mobotix MxPEG stream)

Gal Bar Mashiah galbarm at gmail.com
Tue May 5 07:36:34 CEST 2015


Is it possible to set a specific AVInputFormat when working with the
AVCodec functions?

The way I'm trying to decode the video is:

*ppCodec = avcodec_find_decoder(AV_CODEC_ID_MXPEG);

*ppCodecContext = avcodec_alloc_context3(*ppCodec);

avcodec_open2(*ppCodecContext, *ppCodec, NULL)

and then decode using avcodec_decode_video2(...)

The decode succeeds only for the first frame. I think I need to set the
AVInputFormat to "mxg" in order for this to work for the Mobotix MxPEG
stream, but I'm not sure how.

The error message I'm getting is that got_picture_ptr from
avcodec_decode_video2 returns with 0 for all but the first frame.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150505/723e9da8/attachment.html>


More information about the Libav-user mailing list