[FFmpeg-cvslog] ffserver: move assignment outside condition eval
Reynaldo H. Verdejo Pinochet
git at videolan.org
Sun Mar 8 22:25:51 CET 2015
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Sun Mar 8 14:15:50 2015 -0300| [0002a22e0e4e4214a51f18d0e08517b75696c4c0] | committer: Reynaldo H. Verdejo Pinochet
ffserver: move assignment outside condition eval
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0002a22e0e4e4214a51f18d0e08517b75696c4c0
---
ffserver.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index 29e7bd9..e57c488 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -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++) {
More information about the ffmpeg-cvslog
mailing list