Commit bc4bdc6d authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '764ec701'

* commit '764ec701':
  rtsp: Only interpret $ as interleaved packet indicator at the start of replies
Merged-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parents d560c611 764ec701
...@@ -1136,6 +1136,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, ...@@ -1136,6 +1136,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char ch; unsigned char ch;
const char *p; const char *p;
int ret, content_length, line_count = 0, request = 0; int ret, content_length, line_count = 0, request = 0;
int first_line = 1;
unsigned char *content = NULL; unsigned char *content = NULL;
start: start:
...@@ -1155,8 +1156,7 @@ start: ...@@ -1155,8 +1156,7 @@ start:
return AVERROR_EOF; return AVERROR_EOF;
if (ch == '\n') if (ch == '\n')
break; break;
if (ch == '$') { if (ch == '$' && first_line && q == buf) {
/* XXX: only parse it if first char on line ? */
if (return_on_interleaved_data) { if (return_on_interleaved_data) {
return 1; return 1;
} else } else
...@@ -1167,6 +1167,7 @@ start: ...@@ -1167,6 +1167,7 @@ start:
} }
} }
*q = '\0'; *q = '\0';
first_line = 0;
av_log(s, AV_LOG_TRACE, "line='%s'\n", buf); av_log(s, AV_LOG_TRACE, "line='%s'\n", buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment