确保加载h264视频转流媒体时间戳精准 (#3691)

This commit is contained in:
xia-chu 2024-07-21 19:21:23 +08:00
parent 66065f5359
commit 6583e2869a

View File

@ -29,9 +29,8 @@ static void on_h264_frame(void *user_data, mk_h264_splitter splitter, const char
#else
usleep(40 * 1000);
#endif
static int dts = 0;
uint64_t dts = mk_util_get_current_millisecond();
mk_frame frame = mk_frame_create(MKCodecH264, dts, dts, data, size, NULL, NULL);
dts += 40;
mk_media_input_frame((mk_media) user_data, frame);
mk_frame_unref(frame);
}