Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead



AVStream *out_stream = avformat_new_stream(ofmt_ctx, pCodecH264);

if (!out_stream) {

printf("Failed allocating output stream\n");

ret = AVERROR_UNKNOWN;

return NULL;

}

out_stream->time_base = rate;

 

avcodec_parameters_from_context(out_stream->codecpar, c);

 

av_stream_set_r_frame_rate(out_stream, { 1, 25 });


c是:AVCodecContext *c;

你可能感兴趣的:(视频编解码)