Commit 79621a91 authored by Pierre Ynard's avatar Pierre Ynard

rtsp: fix for loop

This fixes a crash with VoD when all tracks were not set up
parent 75d96e7b
...@@ -442,7 +442,7 @@ int RtspTrackAttach( rtsp_stream_t *rtsp, const char *name, ...@@ -442,7 +442,7 @@ int RtspTrackAttach( rtsp_stream_t *rtsp, const char *name,
goto out; goto out;
rtsp_strack_t *tr = NULL; rtsp_strack_t *tr = NULL;
for (int i = 0; session->trackc; i++) for (int i = 0; i < session->trackc; i++)
{ {
if (session->trackv[i].id == id) if (session->trackv[i].id == id)
{ {
...@@ -500,7 +500,7 @@ void RtspTrackDetach( rtsp_stream_t *rtsp, const char *name, ...@@ -500,7 +500,7 @@ void RtspTrackDetach( rtsp_stream_t *rtsp, const char *name,
if (session == NULL) if (session == NULL)
goto out; goto out;
for (int i = 0; session->trackc; i++) for (int i = 0; i < session->trackc; i++)
{ {
rtsp_strack_t *tr = session->trackv + i; rtsp_strack_t *tr = session->trackv + i;
if (tr->sout_id == sout_id) if (tr->sout_id == sout_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment