OSDN Git Service

avformat/rtmphttp: fix bug for rtmphttp
authorSteven Liu <lq@chinaffmpeg.org>
Mon, 2 Jan 2017 02:05:35 +0000 (10:05 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 2 Jan 2017 18:35:47 +0000 (19:35 +0100)
if the http server don't response the http command,
then the thread will be blocked and never be interrupted.

Reported-by: yinyunjiang <yinyunjiang1991@qq.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/rtmphttp.c

index e5ce10c..ef6146c 100644 (file)
@@ -208,7 +208,7 @@ static int rtmp_http_open(URLContext *h, const char *uri, int flags)
     }
 
     /* alloc the http context */
-    if ((ret = ffurl_alloc(&rt->stream, url, AVIO_FLAG_READ_WRITE, NULL)) < 0)
+    if ((ret = ffurl_alloc(&rt->stream, url, AVIO_FLAG_READ_WRITE, &h->interrupt_callback)) < 0)
         goto fail;
 
     /* set options */