GST_DEBUG_OBJECT (src, "connecting (%s)...", info->location);
int retry = 0;
connect_retry:
+ GST_OBJECT_LOCK (src);
if (priv->do_stop) {
+ GST_OBJECT_UNLOCK (src);
GST_ERROR_OBJECT (src, "stop connecting....");
return GST_RTSP_EINTR;
}
+ GST_OBJECT_UNLOCK (src);
if ((res =
gst_rtsp_connection_connect (info->connection,
if (G_UNLIKELY (!packetizer->calculate_offset))
return GST_CLOCK_TIME_NONE;
- if (G_UNLIKELY (packetizer->refoffset == -1))
- return GST_CLOCK_TIME_NONE;
+ PACKETIZER_GROUP_LOCK (packetizer);
- if (G_UNLIKELY (offset < packetizer->refoffset))
+ if (G_UNLIKELY (packetizer->refoffset == -1)) {
+ PACKETIZER_GROUP_UNLOCK (packetizer);
return GST_CLOCK_TIME_NONE;
+ }
- PACKETIZER_GROUP_LOCK (packetizer);
+ if (G_UNLIKELY (offset < packetizer->refoffset)) {
+ PACKETIZER_GROUP_UNLOCK (packetizer);
+ return GST_CLOCK_TIME_NONE;
+ }
pcrtable = get_pcr_table (packetizer, pid);
if(pcrtable == NULL) {