projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad242b5
)
Handle rtmpdump's no connection return value
author
Sergey M․
<dstftw@gmail.com>
Wed, 5 Mar 2014 15:19:27 +0000
(22:19 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 5 Mar 2014 15:19:27 +0000
(22:19 +0700)
youtube_dl/downloader/rtmp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/downloader/rtmp.py
b/youtube_dl/downloader/rtmp.py
index 67461f160707d1a5e56643181b973728a354bf16..034875ab7f12619a72579c52ee58af4377d259a7 100644
(file)
--- a/
youtube_dl/downloader/rtmp.py
+++ b/
youtube_dl/downloader/rtmp.py
@@
-155,9
+155,14
@@
class RtmpFD(FileDownloader):
RD_SUCCESS = 0
RD_FAILED = 1
RD_INCOMPLETE = 2
+ RD_NO_CONNECT = 3
retval = run_rtmpdump(args)
+ if retval == RD_NO_CONNECT:
+ self.to_screen(u'[rtmpdump] Could not connect to RTMP server.')
+ return False
+
while (retval == RD_INCOMPLETE or retval == RD_FAILED) and not test:
prevsize = os.path.getsize(encodeFilename(tmpfilename))
self.to_screen(u'[rtmpdump] %s bytes' % prevsize)