The branch, master has been updated
via 0fdb5829e38dabea9cbe4073a35b6c6315e7508e (commit)
from dd977adcfe4d74b4240f1122a7c900966a0d0bc3 (commit)
- Log -----------------------------------------------------------------
commit 0fdb5829e38dabea9cbe4073a35b6c6315e7508e
Author: Kaarle Ritvanen <[email protected]>
AuthorDate: Tue Apr 29 14:35:00 2025 +0300
Commit: michaelni <[email protected]>
CommitDate: Sun Sep 28 13:37:43 2025 +0000
avformat/rtsp: set AVFMTCTX_UNSEEKABLE flag
for live RTP streams. Some external applications, such as Qt Multimedia,
depend on this flag being set correctly.
Signed-off-by: Kaarle Ritvanen <[email protected]>
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index d601d63a89..e8f44e571a 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -663,8 +663,8 @@ static void sdp_parse_line(AVFormatContext *s,
SDPParseState *s1,
rtsp_parse_range_npt(p, &start, &end);
s->start_time = start;
/* AV_NOPTS_VALUE means live broadcast (and can't seek) */
- s->duration = (end == AV_NOPTS_VALUE) ?
- AV_NOPTS_VALUE : end - start;
+ if (end != AV_NOPTS_VALUE)
+ s->duration = end - start;
} else if (av_strstart(p, "lang:", &p)) {
if (s->nb_streams > 0) {
get_word(buf1, sizeof(buf1), &p);
@@ -754,6 +754,8 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
char buf[SDP_MAX_SIZE], *q;
SDPParseState sdp_parse_state = { { 0 } }, *s1 = &sdp_parse_state;
+ s->duration = AV_NOPTS_VALUE;
+
p = content;
for (;;) {
p += strspn(p, SPACE_CHARS);
@@ -787,6 +789,9 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
av_freep(&s1->default_exclude_source_addrs[i]);
av_freep(&s1->default_exclude_source_addrs);
+ if (s->duration == AV_NOPTS_VALUE)
+ s->ctx_flags |= AVFMTCTX_UNSEEKABLE;
+
return 0;
}
#endif /* CONFIG_RTPDEC */
-----------------------------------------------------------------------
Summary of changes:
libavformat/rtsp.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]