tsdemux: Fix mpegts_packetizer_set_current_pcr_offset()

When adjusting the PCR offset of groups, adjust the correct group
entry from the list - not the current group repeatedly.
This commit is contained in:
Jan Schmidt 2014-03-25 21:40:11 +11:00
parent a99164811c
commit bfe2994101

View File

@ -2334,17 +2334,17 @@ mpegts_packetizer_set_current_pcr_offset (MpegTSPacketizer2 * packetizer,
if (tgroup == group) if (tgroup == group)
apply = TRUE; apply = TRUE;
if (apply) { if (apply) {
group->pcr_offset += delta; tgroup->pcr_offset += delta;
GST_DEBUG ("Update group PCR %" GST_TIME_FORMAT " (offset %" GST_DEBUG ("Update group PCR %" GST_TIME_FORMAT " (offset %"
G_GUINT64_FORMAT " pcr_offset %" GST_TIME_FORMAT, G_GUINT64_FORMAT " pcr_offset %" GST_TIME_FORMAT,
GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->first_pcr)), GST_TIME_ARGS (PCRTIME_TO_GSTTIME (tgroup->first_pcr)),
group->first_offset, tgroup->first_offset,
GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->pcr_offset))); GST_TIME_ARGS (PCRTIME_TO_GSTTIME (tgroup->pcr_offset)));
} else } else
GST_DEBUG ("Not modifying group PCR %" GST_TIME_FORMAT " (offset %" GST_DEBUG ("Not modifying group PCR %" GST_TIME_FORMAT " (offset %"
G_GUINT64_FORMAT " pcr_offset %" GST_TIME_FORMAT, G_GUINT64_FORMAT " pcr_offset %" GST_TIME_FORMAT,
GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->first_pcr)), GST_TIME_ARGS (PCRTIME_TO_GSTTIME (tgroup->first_pcr)),
group->first_offset, tgroup->first_offset,
GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->pcr_offset))); GST_TIME_ARGS (PCRTIME_TO_GSTTIME (tgroup->pcr_offset)));
} }
} }