ffserver: move assignment outside condition eval

Signed-off-by: 's avatarReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
parent 923a2445
...@@ -2837,9 +2837,12 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer, ...@@ -2837,9 +2837,12 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer,
snprintf(avc->filename, 1024, "rtp://0.0.0.0"); snprintf(avc->filename, 1024, "rtp://0.0.0.0");
} }
if (!(avc->streams = av_malloc_array(avc->nb_streams, sizeof(*avc->streams)))) avc->streams = av_malloc_array(avc->nb_streams, sizeof(*avc->streams));
if (!avc->streams)
goto sdp_done; goto sdp_done;
if (!(avs = av_malloc_array(avc->nb_streams, sizeof(*avs))))
avs = av_malloc_array(avc->nb_streams, sizeof(*avs));
if (!avs)
goto sdp_done; goto sdp_done;
for(i = 0; i < stream->nb_streams; i++) { for(i = 0; i < stream->nb_streams; i++) {
......
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