jjzjj

c++ - 使用 ffmpeg 和分离的 AVCodecContext 解码 h264 rtsp

我需要一些解码rtsp视频流的帮助。我从AXISIP摄像机获得它。我为此使用ffmpeg库。需要单独创建AVCodecContext,而不是从AVFormatContext->streams[...]->codec;所以我创建了AVCodec、AVCOdecContext并尝试初始化它们。AVCodec*codec=avcodec_find_decoder(codec_id);if(!codec){qDebug()}AVCodecContext*context=avcodec_alloc_context3(codec);if(!context){qDebug()}avcodec_ope