[FFmpeg-cvslog] http: Reduce scope of a variable in parse_content_encoding()
Diego Biurrun
git at videolan.org
Fri Aug 15 12:29:46 CEST 2014
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Aug 13 21:33:27 2014 +0200| [7ccb847f0f1f28199fa254847b91b6e50fb92832] | committer: Diego Biurrun
http: Reduce scope of a variable in parse_content_encoding()
Also fixes an unused variable warning with zlib disabled.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ccb847f0f1f28199fa254847b91b6e50fb92832
---
libavformat/http.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 377d30e..e970786 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) {
More information about the ffmpeg-cvslog
mailing list