Skip to content

Commit

Permalink
ffserver: move assignment outside condition eval
Browse files Browse the repository at this point in the history
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
  • Loading branch information
reynaldo committed Mar 8, 2015
1 parent 923a244 commit 0002a22
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ffserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2837,9 +2837,12 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer,
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;
if (!(avs = av_malloc_array(avc->nb_streams, sizeof(*avs))))

avs = av_malloc_array(avc->nb_streams, sizeof(*avs));
if (!avs)
goto sdp_done;

for(i = 0; i < stream->nb_streams; i++) {
Expand Down

0 comments on commit 0002a22

Please sign in to comment.