From: hyc Date: Sat, 13 Mar 2010 20:49:51 +0000 (+0000) Subject: app is a required parameter X-Git-Tag: v2.4~192 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29e3f7a53d27b7bab9dbf1b2b0c7f11f10ba21b6;p=rtmpdump app is a required parameter git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@343 400ebc74-4327-4243-bc38-086b20814532 --- diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c index 6cbad8e..12bc36d 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c @@ -2901,7 +2901,7 @@ Read_1_Packet(RTMP *r, char *buf, int buflen) } if (r->m_read.flags & RTMP_READ_SEEKING) - { + { ret = RTMP_READ_IGNORE; break; } diff --git a/rtmpdump.c b/rtmpdump.c index b3ce51d..726e85f 100644 --- a/rtmpdump.c +++ b/rtmpdump.c @@ -1129,13 +1129,19 @@ main(int argc, char **argv) if (hostname == 0) { Log(LOGERROR, - "You must specify a hostname (--host) or url (-r \"rtmp://host[:port]/playpath\") containing a hostname"); + "You must specify a hostname (--host) or url (-r \"rtmp://host[:port]/app/playpath\") containing a hostname"); return RD_FAILED; } if (playpath.av_len == 0) { Log(LOGERROR, - "You must specify a playpath (--playpath) or url (-r \"rtmp://host[:port]/playpath\") containing a playpath"); + "You must specify a playpath (--playpath) or url (-r \"rtmp://host[:port]/app/playpath\") containing a playpath"); + return RD_FAILED; + } + if (app.av_len == 0) + { + Log(LOGERROR, + "You must specify an app (--app) or url (-r \"rtmp://host[:port]/app/playpath\") containing an app"); return RD_FAILED; } @@ -1207,7 +1213,7 @@ main(int argc, char **argv) } #endif - if (tcUrl.av_len == 0 && app.av_len != 0) + if (tcUrl.av_len == 0) { char str[512] = { 0 }; diff --git a/rtmpgw.c b/rtmpgw.c index 411bd5c..dfbecc5 100644 --- a/rtmpgw.c +++ b/rtmpgw.c @@ -464,14 +464,20 @@ void processTCPrequest(STREAMING_SERVER * server, // server socket and state (ou if (req.hostname == 0) { Log(LOGERROR, - "You must specify a hostname (--host) or url (-r \"rtmp://host[:port]/playpath\") containing a hostname"); + "You must specify a hostname (--host) or url (-r \"rtmp://host[:port]/app/playpath\") containing a hostname"); goto filenotfound; } if (req.playpath.av_len == 0) { Log(LOGERROR, - "You must specify a playpath (--playpath) or url (-r \"rtmp://host[:port]/playpath\") containing a playpath"); - goto filenotfound;; + "You must specify a playpath (--playpath) or url (-r \"rtmp://host[:port]/app/playpath\") containing a playpath"); + goto filenotfound; + } + if (req.app.av_len == 0) + { + Log(LOGERROR, + "You must specify an app (--app) or url (-r \"rtmp://host[:port]/app/playpath\") containing an app"); + goto filenotfound; } if (req.protocol == RTMP_PROTOCOL_UNDEFINED)