mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 11:40:38 +00:00
rtsp-media: Get rates only on sender streams
When play a media with both sender and receiver stream, like ONVIF back channel audio in, gst_rtsp_media_get_rates call gst_rtsp_stream_get_rates for each stream to set the rates. But gst_rtsp_stream_get_rates return false for the receiver steam, which lead a g_assert crash. Instead to get rates on all streams, now just get rates on sender streams. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/150>
This commit is contained in:
parent
3b9eaa092e
commit
c747711ac5
1 changed files with 2 additions and 1 deletions
|
@ -2709,7 +2709,8 @@ gst_rtsp_media_get_rates (GstRTSPMedia * media, gdouble * rate,
|
||||||
g_assert (priv->streams->len > 0);
|
g_assert (priv->streams->len > 0);
|
||||||
for (i = 0; i < priv->streams->len; i++) {
|
for (i = 0; i < priv->streams->len; i++) {
|
||||||
stream = g_ptr_array_index (priv->streams, i);
|
stream = g_ptr_array_index (priv->streams, i);
|
||||||
if (gst_rtsp_stream_is_complete (stream)) {
|
if (gst_rtsp_stream_is_complete (stream)
|
||||||
|
&& gst_rtsp_stream_is_sender (stream)) {
|
||||||
if (gst_rtsp_stream_get_rates (stream, rate, applied_rate)) {
|
if (gst_rtsp_stream_get_rates (stream, rate, applied_rate)) {
|
||||||
if (first_stream) {
|
if (first_stream) {
|
||||||
save_rate = *rate;
|
save_rate = *rate;
|
||||||
|
|
Loading…
Reference in a new issue