diff --git a/src/merge/pr_generic.h b/src/merge/pr_generic.h index cdb8ce134..673584fc4 100644 --- a/src/merge/pr_generic.h +++ b/src/merge/pr_generic.h @@ -98,7 +98,7 @@ struct packet_t { KaxBlock *block; KaxCluster *cluster; unsigned char *data; - int length, ref_priority; + int length, ref_priority, time_factor; int64_t timecode, bref, fref, duration, packet_num, assigned_timecode; int64_t unmodified_assigned_timecode, unmodified_duration; bool duration_mandatory, superseeded, gap_following; @@ -111,7 +111,7 @@ struct packet_t { packet_t(): group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), - ref_priority(0), + ref_priority(0), time_factor(1), timecode(0), bref(0), fref(0), duration(0), packet_num(0), assigned_timecode(0), unmodified_assigned_timecode(0), @@ -125,7 +125,7 @@ struct packet_t { int64_t n_bref = -1, int64_t n_fref = -1): group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), - ref_priority(0), + ref_priority(0), time_factor(1), timecode(n_timecode), bref(n_bref), fref(n_fref), duration(n_duration), packet_num(0), @@ -140,7 +140,7 @@ struct packet_t { int64_t n_bref = -1, int64_t n_fref = -1): group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), - ref_priority(0), + ref_priority(0), time_factor(1), timecode(n_timecode), bref(n_bref), fref(n_fref), duration(n_duration), packet_num(0), diff --git a/src/output/p_video.cpp b/src/output/p_video.cpp index f09b066b1..b32ae144b 100644 --- a/src/output/p_video.cpp +++ b/src/output/p_video.cpp @@ -225,6 +225,8 @@ mpeg1_2_video_packetizer_c::process(packet_cptr packet) { packet->duration = frame->duration; packet->bref = frame->firstRef; packet->fref = frame->secondRef; + packet->time_factor = + MPEG2_PICTURE_TYPE_FRAME == frame->pictureStructure ? 1 : 2; video_packetizer_c::process(packet); frame->data = NULL; delete frame;