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;

 

扫描二维码关注公众号,回复: 879339 查看本文章

avcodec_parameters_from_context(out_stream->codecpar, c);

 

av_stream_set_r_frame_rate(out_stream, { 1, 25 });


c是:AVCodecContext *c;

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/80336037