Merge commit '7395784ba72742b6daa62d35db4028e09f3fdf06'
[ffmpeg.git] / libavformat / rtmpproto.c
index 7b2bd81bd12beb8ec0a8f6c1f1732cc91b44fa1d..c0e2df447ecd9230caded25715b76fe513159e2b 100644 (file)
@@ -1953,6 +1953,13 @@ static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
         !strcmp(command, "publish")) {
         ret = ff_amf_read_string(&gbc, filename,
                                  sizeof(filename), &stringlen);
+        if (ret) {
+            if (ret == AVERROR(EINVAL))
+                av_log(s, AV_LOG_ERROR, "Unable to parse stream name - name too long?\n");
+            else
+                av_log(s, AV_LOG_ERROR, "Unable to parse stream name\n");
+            return ret;
+        }
         // check with url
         if (s->filename) {
             pchar = strrchr(s->filename, '/');