mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mpegtspacketizer: Don't dereference NULL if we have no PCR yet
Can happen sometimes if the duration is requested before we received enough data with a PCR.
This commit is contained in:
parent
c103f7134b
commit
aa6ee77297
1 changed files with 6 additions and 0 deletions
|
@ -2118,6 +2118,12 @@ mpegts_packetizer_offset_to_ts (MpegTSPacketizer2 * packetizer,
|
|||
packetizer->refoffset;
|
||||
} else {
|
||||
PCROffsetCurrent *current = pcrtable->current;
|
||||
|
||||
if (!current->group) {
|
||||
PACKETIZER_GROUP_UNLOCK (packetizer);
|
||||
GST_LOG ("No PCR yet");
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
/* If doing progressive read, use current */
|
||||
GST_LOG ("Using current group");
|
||||
lastpcr = current->group->pcr_offset + current->pending[current->last].pcr;
|
||||
|
|
Loading…
Reference in a new issue