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
@ -2118,6 +2118,12 @@ mpegts_packetizer_offset_to_ts (MpegTSPacketizer2 * packetizer,
|
|||||||
packetizer->refoffset;
|
packetizer->refoffset;
|
||||||
} else {
|
} else {
|
||||||
PCROffsetCurrent *current = pcrtable->current;
|
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 */
|
/* If doing progressive read, use current */
|
||||||
GST_LOG ("Using current group");
|
GST_LOG ("Using current group");
|
||||||
lastpcr = current->group->pcr_offset + current->pending[current->last].pcr;
|
lastpcr = current->group->pcr_offset + current->pending[current->last].pcr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user