mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
The MPEG-1/-2 video packetizer has to create a new packet_t structure for each packet it passes downstream because it may produce more than one output packet from each input packet, and packet_t structures must only be used once.
This commit is contained in:
parent
f76cf0353e
commit
8b5d160c70
@ -219,15 +219,13 @@ mpeg1_2_video_packetizer_c::process(packet_cptr packet) {
|
|||||||
if (hcodec_private == NULL)
|
if (hcodec_private == NULL)
|
||||||
create_private_data();
|
create_private_data();
|
||||||
|
|
||||||
packet->memory = memory_cptr(new memory_c(frame->data, frame->size,
|
packet_t *new_packet =
|
||||||
true));
|
new packet_t(new memory_c(frame->data, frame->size, true),
|
||||||
packet->timecode = frame->timecode;
|
frame->timecode, frame->duration,
|
||||||
packet->duration = frame->duration;
|
frame->firstRef, frame->secondRef);
|
||||||
packet->bref = frame->firstRef;
|
new_packet->time_factor =
|
||||||
packet->fref = frame->secondRef;
|
|
||||||
packet->time_factor =
|
|
||||||
MPEG2_PICTURE_TYPE_FRAME == frame->pictureStructure ? 1 : 2;
|
MPEG2_PICTURE_TYPE_FRAME == frame->pictureStructure ? 1 : 2;
|
||||||
video_packetizer_c::process(packet);
|
video_packetizer_c::process(packet_cptr(new_packet));
|
||||||
frame->data = NULL;
|
frame->data = NULL;
|
||||||
delete frame;
|
delete frame;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user