avformat/http : Added check for valid URL context before calling shutdown

This commit is contained in:
kjeyapal@akamai.com 2018-11-16 14:27:12 +05:30 committed by Karthick J
parent 4903662a1d
commit ce0a753634
1 changed files with 1 additions and 1 deletions

View 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);