From 4e05f75261d997cfc48227f5ac1ab8f18101c437 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 13 May 2018 12:56:03 +0200 Subject: demux_lavf: remove ffm blacklist entry ffm (ffserver) was removed from ffmpeg. --- demux/demux_lavf.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 555df9406d..60ae878398 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -186,8 +186,6 @@ static const struct format_hack format_hacks[] = { BLACKLIST("bin"), // Useless, does not work with custom streams. BLACKLIST("image2"), - // Probably a security risk. - BLACKLIST("ffm"), // Image demuxers ("_pipe" is detected explicitly) {"image2pipe", .image_format = true}, {0} -- cgit v1.2.3 From 31b78ad7fa97d8047b609c1647a273e72612d425 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 17 May 2018 20:58:49 +0200 Subject: misc: move mp_cancel from stream.c to thread_tools.c It seems a bit inappropriate to have dumped this into stream.c, even if it's roughly speaking its main user. At least it made its way somewhat unfortunately to other components not related to the stream or demuxer layer at all. I'm too greedy to give this weird helper its own file, so dump it into thread_tools.c. Probably a somewhat pointless change. --- demux/demux_lavf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 60ae878398..a0b5ff7472 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -42,6 +42,7 @@ #include "common/av_common.h" #include "misc/bstr.h" #include "misc/charset_conv.h" +#include "misc/thread_tools.h" #include "stream/stream.h" #include "demux.h" -- cgit v1.2.3 From f9713921a372aa14ea631b0c546d3fbeade32b71 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 18 May 2018 15:48:14 +0200 Subject: demux: add a "cancel" field Instead of relying on demuxer->stream->cancel. This is better because the stream is potentially closed and replaced. --- demux/demux_lavf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index a0b5ff7472..41c334d309 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -775,8 +775,7 @@ static void update_metadata(demuxer_t *demuxer) static int interrupt_cb(void *ctx) { struct demuxer *demuxer = ctx; - lavf_priv_t *priv = demuxer->priv; - return mp_cancel_test(priv->stream->cancel); + return mp_cancel_test(demuxer->cancel); } static int block_io_open(struct AVFormatContext *s, AVIOContext **pb, -- cgit v1.2.3 From 982416266c9596bec0ee4a1b1098d37a0f79ad94 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 24 May 2018 19:33:25 +0200 Subject: demux_lavf: drop obscure genpts option This code shouldn't even exist in libavformat. If you still need it, you can enable it via --demuxer-lavf-o. --- demux/demux_lavf.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 41c334d309..ee81ff2773 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -77,7 +77,6 @@ struct demux_lavf_opts { char *format; char **avopts; int hacks; - int genptsmode; char *sub_cp; int rtsp_transport; }; @@ -96,8 +95,6 @@ const struct m_sub_options demux_lavf_conf = { OPT_INTRANGE("demuxer-lavf-probescore", probescore, 0, 1, AVPROBE_SCORE_MAX), OPT_FLAG("demuxer-lavf-hacks", hacks, 0), - OPT_CHOICE("demuxer-lavf-genpts-mode", genptsmode, 0, - ({"lavf", 1}, {"no", 0})), OPT_KEYVALUELIST("demuxer-lavf-o", avopts, 0), OPT_STRING("sub-codepage", sub_cp, 0), OPT_CHOICE("rtsp-transport", rtsp_transport, 0, @@ -814,8 +811,6 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check) if (!avfc) return -1; - if (lavfdopts->genptsmode) - avfc->flags |= AVFMT_FLAG_GENPTS; if (index_mode != 1) avfc->flags |= AVFMT_FLAG_IGNIDX; -- cgit v1.2.3 From 9467e90c5bc1c15245acf27afd6dc83287beba9d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 24 Aug 2018 12:55:10 +0200 Subject: demux_lavf: v4l streams are not seekable FFmpeg is retarded enough not to give us any indication whether it is (unless we query fields not in the ABI/API). I bet FFmpeg developers love it when library users have to litter their code with duplicated information. --- demux/demux_lavf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'demux/demux_lavf.c') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index ee81ff2773..333d707028 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -163,6 +163,8 @@ static const struct format_hack format_hacks[] = { {"mp4", .skipinfo = true, .fix_editlists = true}, {"matroska", .skipinfo = true}, + {"v4l2", .no_seek = true}, + // In theory, such streams might contain timestamps, but virtually none do. {"h264", .if_flags = AVFMT_NOTIMESTAMPS }, {"hevc", .if_flags = AVFMT_NOTIMESTAMPS }, -- cgit v1.2.3