Decode h264 rtsp with ffmpeg and separated AVCodecContext
I need some help with decodein rtsp stream of video. I get it from AXIS IP-camera. I use ffmpeg library for it. It is neccessary to create AVCodecContext separately, not from AVFormatContext->streams[...]->codec; So i create AVCodec, AVCOdecContext and try to init them. AVCodec *codec=avcodec_find_decoder(codec_id); if(!codec) { qDebug()<<"FFMPEG failed to create codec"<<codec_id; return false; //--> } AVCodecContext *context=avcodec_alloc_context3(codec); if(!context) { qDebug()<<"FFMPEG failed to allocate codec context"; return false; //--> } avcodec_open2(context, codec, NULL); Then in main