fix vlc can't play mp4 of jpeg #2388

This commit is contained in:
xiongguangjie 2023-04-19 19:40:58 +08:00
parent fcb0124f29
commit 30182701f5

View File

@ -121,6 +121,18 @@ bool MP4MuxerInterface::inputFrame(const Frame::Ptr &frame) {
});
break;
}
case CodecJPEG:{
int64_t dts_out, pts_out;
track_info.stamp.revise(frame->dts(), frame->pts(), dts_out, pts_out);
mp4_writer_write(_mov_writter.get(),
track_info.track_id,
frame->data(),
frame->size(),
pts_out,
dts_out,
frame->keyFrame() ? MOV_AV_FLAG_KEYFREAME : 0);
break;
}
default: {
int64_t dts_out, pts_out;