diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-06 16:45:00 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-10 07:31:47 +0200 |
commit | 437484a66a3c1d002ab6683eab6eba90d517a35a (patch) | |
tree | 1d5e7cce43be171f84abf02a543046971a96b085 /libavformat/mux_utils.c | |
parent | d78838414b8362a7aa7c27abacee1f6ca036199c (diff) |
avformat/utils: Move ff_format_output_open() to mux_utils.c
It is obviously a muxing-only function.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mux_utils.c')
-rw-r--r-- | libavformat/mux_utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c index df264fc6a0..83c1482540 100644 --- a/libavformat/mux_utils.c +++ b/libavformat/mux_utils.c @@ -85,6 +85,16 @@ end: return ret; } +int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **options) +{ + if (!s->oformat) + return AVERROR(EINVAL); + + if (!(s->oformat->flags & AVFMT_NOFILE)) + return s->io_open(s, &s->pb, url, AVIO_FLAG_WRITE, options); + return 0; +} + int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds) { AVDictionaryEntry *entry; |