if (gst_rtsp_range_parse (str, &range) == GST_RTSP_OK) {
/* we have a range, seek to the position */
unit = range->unit;
- gst_rtsp_media_seek (media, range);
+ if (!gst_rtsp_media_seek (media, range)) {
+ gst_rtsp_range_free (range);
+ goto seek_failed;
+ }
gst_rtsp_range_free (range);
}
}
send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
return FALSE;
}
+seek_failed:
+ {
+ GST_ERROR ("client %p: seek failed", client);
+ send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ return FALSE;
+ }
unsupported_mode:
{
GST_ERROR ("client %p: media does not support PLAY", client);
/* and block for the seek to complete */
GST_INFO ("done seeking %d", res);
+ if (!res)
+ goto seek_failed;
+
g_rec_mutex_unlock (&priv->state_lock);
/* wait until pipeline is prerolled again, this will also collect stats */
GST_WARNING ("conversion to npt not supported");
return FALSE;
}
+seek_failed:
+ {
+ g_rec_mutex_unlock (&priv->state_lock);
+ GST_INFO ("seeking failed");
+ return FALSE;
+ }
preroll_failed:
{
GST_WARNING ("failed to preroll after seek");