Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2015-10-29 15:39:49 +0300
committerDiego Biurrun <diego@biurrun.de>2016-11-02 12:33:39 +0300
commitf4ca8ea92a8b36fe723412aefafc1b2fa89f8dc6 (patch)
tree792b18031d0f9589663871734a6bddceea64b095 /libavformat/rtmpproto.c
parentbaab87c4f30e75ea309294b06adcd01ce678bdc5 (diff)
rtmpproto: Restructure zlib code to avoid unreachable code warning
libavformat\rtmpproto.c(1165) : warning C4702: unreachable code
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 0097841e81..5298c18790 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1111,7 +1111,7 @@ static int rtmp_calc_swfhash(URLContext *s)
{
RTMPContext *rt = s->priv_data;
uint8_t *in_data = NULL, *out_data = NULL, *swfdata;
- int64_t in_size, out_size;
+ int64_t in_size;
URLContext *stream;
char swfhash[32];
int swfsize;
@@ -1143,6 +1143,8 @@ static int rtmp_calc_swfhash(URLContext *s)
}
if (!memcmp(in_data, "CWS", 3)) {
+#if CONFIG_ZLIB
+ int64_t out_size;
/* Decompress the SWF player file using Zlib. */
if (!(out_data = av_malloc(8))) {
ret = AVERROR(ENOMEM);
@@ -1152,18 +1154,17 @@ static int rtmp_calc_swfhash(URLContext *s)
memcpy(out_data, in_data, 8);
out_size = 8;
-#if CONFIG_ZLIB
if ((ret = rtmp_uncompress_swfplayer(in_data + 8, in_size - 8,
&out_data, &out_size)) < 0)
goto fail;
+ swfsize = out_size;
+ swfdata = out_data;
#else
av_log(s, AV_LOG_ERROR,
"Zlib is required for decompressing the SWF player file.\n");
ret = AVERROR(EINVAL);
goto fail;
#endif
- swfsize = out_size;
- swfdata = out_data;
} else {
swfsize = in_size;
swfdata = in_data;