time_base requires newer ffmpeg

pull/3468/head
Isaac Connor 2022-04-21 10:36:20 -04:00
parent dd86be0811
commit 1a6f651424
1 changed files with 2 additions and 0 deletions

View File

@ -1009,7 +1009,9 @@ int VideoStore::writeVideoFramePacket(const std::shared_ptr<ZMPacket> &zm_packet
//zm_packet->out_frame->pict_type = AV_PICTURE_TYPE_NONE;
//zm_packet->out_frame->key_frame = zm_packet->keyframe;
//frame->pkt_duration = 0;
#if HAVE_LIBAVUTIL_HWCONTEXT_H && LIBAVCODEC_VERSION_CHECK(57, 107, 0, 107, 0)
frame->time_base = video_out_ctx->time_base;
#endif
if (!video_first_pts) {
video_first_pts = static_cast<int64>(std::chrono::duration_cast<Microseconds>(zm_packet->timestamp.time_since_epoch()).count());