avstream_video->codecpar->codec_id = AV_CODEC_ID_H264;
} else if (video_codec == CODEC_AV1) {
avstream_video->codecpar->codec_id = AV_CODEC_ID_AV1;
- } else if (video_codec == CODEC_NV12) {
- avstream_video->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
- avstream_video->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag(AV_PIX_FMT_NV12);
} else {
assert(video_codec == CODEC_MJPEG);
avstream_video->codecpar->codec_id = AV_CODEC_ID_MJPEG;
void Mux::add_packet(const AVPacket &pkt, int64_t pts, int64_t dts, AVRational timebase, int stream_index_override)
{
+ assert(pts >= dts);
+
AVPacket pkt_copy;
av_init_packet(&pkt_copy);
if (av_packet_ref(&pkt_copy, &pkt) < 0) {