avformat/http : Added check for valid URL context before calling shutdown
authorkjeyapal@akamai.com <kjeyapal@akamai.com>
Fri, 16 Nov 2018 08:57:12 +0000 (14:27 +0530)
committerKarthick J <kjeyapal@akamai.com>
Thu, 22 Nov 2018 06:36:27 +0000 (12:06 +0530)
libavformat/http.c

index 3a35bc7..240304f 100644 (file)
@@ -1650,7 +1650,7 @@ static int http_close(URLContext *h)
     av_freep(&s->inflate_buffer);
 #endif /* CONFIG_ZLIB */
 
-    if (!s->end_chunked_post)
+    if (s->hd && !s->end_chunked_post)
         /* Close the write direction by sending the end of chunked encoding. */
         ret = http_shutdown(h, h->flags);