aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-30 18:37:34 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-30 18:37:37 +0200
commitbc4bdc6d61527e9e1bd2ff6d39ee68eac68ff9de (patch)
treefc0d84b05d44f452124bcf70207af479e49a2f1d /libavformat
parentd560c61125b3ee0ec8cd2e228f0604b63f85b8b2 (diff)
parent764ec70149728be82304c163ccc4e280f1629201 (diff)
downloadffmpeg-bc4bdc6d61527e9e1bd2ff6d39ee68eac68ff9de.tar.gz
Merge commit '764ec70149728be82304c163ccc4e280f1629201'
* commit '764ec70149728be82304c163ccc4e280f1629201': rtsp: Only interpret $ as interleaved packet indicator at the start of replies Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 98bd4cbe9a..9aa66d24a4 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1136,6 +1136,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char ch;
const char *p;
int ret, content_length, line_count = 0, request = 0;
+ int first_line = 1;
unsigned char *content = NULL;
start:
@@ -1155,8 +1156,7 @@ start:
return AVERROR_EOF;
if (ch == '\n')
break;
- if (ch == '$') {
- /* XXX: only parse it if first char on line ? */
+ if (ch == '$' && first_line && q == buf) {
if (return_on_interleaved_data) {
return 1;
} else
@@ -1167,6 +1167,7 @@ start:
}
}
*q = '\0';
+ first_line = 0;
av_log(s, AV_LOG_TRACE, "line='%s'\n", buf);