mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 04:58:47 +00:00
rtsp-media: fix RECORD getting stuck
The test_record case was working because async=false had been added in https://bugzilla.gnome.org/show_bug.cgi?id=757488 but that was incorrect, as it should not be needed. Removing async=false made the test fail as expected, this is fixed by not trying to preroll when preparing the media for RECORD, as start_prepare is called upon receiving ANNOUNCE, and our peer will not start sending media until it has received a response to that request, and sent and received a response to RECORD as well, thus obviously preventing preroll. https://bugzilla.gnome.org/show_bug.cgi?id=793738
This commit is contained in:
parent
99edc9445a
commit
ddb0d83844
2 changed files with 8 additions and 2 deletions
|
@ -3058,8 +3058,14 @@ start_prepare (GstRTSPMedia * media)
|
||||||
g_object_set_data (G_OBJECT (elem), "gst-rtsp-dynpay-handlers", handlers);
|
g_object_set_data (G_OBJECT (elem), "gst-rtsp-dynpay-handlers", handlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!start_preroll (media))
|
if (priv->nb_dynamic_elements == 0 && is_receive_only (media)) {
|
||||||
|
/* If we are receive_only (RECORD), do not try to preroll, to avoid
|
||||||
|
* a second ASYNC state change failing */
|
||||||
|
priv->is_live = TRUE;
|
||||||
|
gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARED);
|
||||||
|
} else if (!start_preroll (media)) {
|
||||||
goto preroll_failed;
|
goto preroll_failed;
|
||||||
|
}
|
||||||
|
|
||||||
g_rec_mutex_unlock (&priv->state_lock);
|
g_rec_mutex_unlock (&priv->state_lock);
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ GST_START_TEST (test_record)
|
||||||
|
|
||||||
mfactory =
|
mfactory =
|
||||||
start_record_server
|
start_record_server
|
||||||
("( rtppcmadepay name=depay0 ! appsink name=sink async=false )");
|
("( rtppcmadepay name=depay0 ! appsink name=sink )");
|
||||||
|
|
||||||
g_signal_connect (mfactory, "media-constructed",
|
g_signal_connect (mfactory, "media-constructed",
|
||||||
G_CALLBACK (media_constructed_cb), &server_sink);
|
G_CALLBACK (media_constructed_cb), &server_sink);
|
||||||
|
|
Loading…
Reference in a new issue