From 0200a71e2f40b26cbd9bd956089857205e72c6e5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 2 Mar 2018 19:07:12 +0100 Subject: demux_lavf: add some hacks for SDP Just the usual guess-what-opaque-ffmpeg-thing-supports. See #5550. It looks like we can reduce packet drop by having the cache enabled automatically. --- demux/demux_lavf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 4e1e3067ea..27c5f5087f 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -136,6 +136,8 @@ struct format_hack { bool clear_filepos : 1; bool ignore_start : 1; bool fix_editlists : 1; + bool is_network : 1; + bool no_seek : 1; }; #define BLACKLIST(fmt) {fmt, .ignore = true} @@ -153,6 +155,7 @@ static const struct format_hack format_hacks[] = { {"hls", .no_stream = true, .clear_filepos = true}, {"dash", .no_stream = true, .clear_filepos = true}, + {"sdp", .clear_filepos = true, .is_network = true, .no_seek = true}, {"mpeg", .use_stream_ids = true}, {"mpegts", .use_stream_ids = true}, @@ -935,6 +938,9 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check) demuxer->seekable = false; #endif + demuxer->is_network |= priv->format_hack.is_network; + demuxer->seekable &= !priv->format_hack.no_seek; + if (priv->avfc->duration > 0) { demuxer->duration = (double)priv->avfc->duration / AV_TIME_BASE; } else { -- cgit v1.2.3