Browse Source

rtsp: Don't warn about unparsed time ranges

This removes the error logging added in 4e54432164.

This avoids warnings about "Invalid interval start specification 'now'"
for live rtsp streams.

We only try to parse some of the many valid values for time ranges
in RTSP - the other ones are fully valid but not interesting for the
use case in rtsp.c, so we shouldn't warn about them.

(Parsing the time ranges is needed to allow seeking, but e.g. setting
the current realtime clock for the start time doesn't make sense.
av_parse_time has got a different mode for parsing absolute times
as well, which can handle the special case "now", but that doesn't
make much sense for this particular use in rtsp.c.)

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.7
Martin Storsjö 11 years ago
parent
commit
eb7ddb5066
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      libavformat/rtsp.c

+ 2
- 5
libavformat/rtsp.c View File

@@ -169,15 +169,12 @@ static void rtsp_parse_range_npt(const char *p, int64_t *start, int64_t *end)
*end = AV_NOPTS_VALUE;

get_word_sep(buf, sizeof(buf), "-", &p);
if (av_parse_time(start, buf, 1) < 0) {
av_log(NULL, AV_LOG_ERROR, "Invalid interval start specification '%s'\n", buf);
if (av_parse_time(start, buf, 1) < 0)
return;
}
if (*p == '-') {
p++;
get_word_sep(buf, sizeof(buf), "-", &p);
if (av_parse_time(end, buf, 1) < 0)
av_log(NULL, AV_LOG_ERROR, "Invalid interval end specification '%s'\n", buf);
av_parse_time(end, buf, 1);
}
}



Loading…
Cancel
Save