tspacketizer: ensure that a null pointer isn't accessed

Mitigates segfault due race condition in FLUSH_START handling and
mpegts_base_chain.
This commit is contained in:
Josep Torra 2012-11-09 22:17:11 +01:00
parent 651203de07
commit 6efd611b8c

View file

@ -2624,6 +2624,7 @@ mpegts_packetizer_next_packet (MpegTSPacketizer2 * packetizer,
priv->mapped =
(guint8 *) gst_adapter_map (packetizer->adapter, priv->mapped_size);
priv->offset = 0;
g_return_val_if_fail (priv->mapped, PACKET_NEED_MORE);
}
packet->data_start = priv->mapped + priv->offset;