aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-08-13 21:33:27 +0200
committerDiego Biurrun <diego@biurrun.de>2014-08-15 09:37:38 +0200
commit7ccb847f0f1f28199fa254847b91b6e50fb92832 (patch)
tree14fab818b00068f07627a4ed2d475d8b33faa11e /libavformat
parent552bc42df48784ae3ce0d499ece5b33f3cc7576a (diff)
downloadffmpeg-7ccb847f0f1f28199fa254847b91b6e50fb92832.tar.gz
http: Reduce scope of a variable in parse_content_encoding()
Also fixes an unused variable warning with zlib disabled.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 377d30e784..e970786312 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -384,11 +384,11 @@ static void parse_content_range(URLContext *h, const char *p)
static int parse_content_encoding(URLContext *h, const char *p)
{
- HTTPContext *s = h->priv_data;
-
if (!av_strncasecmp(p, "gzip", 4) ||
!av_strncasecmp(p, "deflate", 7)) {
#if CONFIG_ZLIB
+ HTTPContext *s = h->priv_data;
+
s->compressed = 1;
inflateEnd(&s->inflate_stream);
if (inflateInit2(&s->inflate_stream, 32 + 15) != Z_OK) {