当编码器配置的宽高与填入编码器的宽高不相同时,就会报此错误;
cpp
encodec_ctx->height = decodec_ctx->height;//1920;
encodec_ctx->width = decodec_ctx->width;//1088;
cpp
enc_frame->width = 1088;//encodec_ctx->width;
enc_frame->height = 1920;//encodec_ctx->height;
cpp
avcodec_send_frame(encodec_ctx, enc_frame);//265阻塞在这里
avcodec_receive_packet(encodec_ctx, &send_pkt);
此时就会报以下错误:
[h264_qsv @ 0x55a7005acb40] Error during encoding: undefined behavior (-16)