av_interleaved_write_frame 写入H264到mp4中,如果出现B帧,会返回-22 错误
此问题原因,如下:AVPacket中pts必须大于或等于dts,否则就返回-22错误,B帧正好是pts=dts即可videopacket_t.pts=av_rescale_q(timestamp,time_base_t,videoStream->time_base);videopacket_t.dts=av_rescale_q(dts,time_base_t,videoStream->time_b