aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/filmstripenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-20 00:51:30 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-22 23:57:20 +0100
commit073251316e1b0e4174a5aea41e8a3ce25590b165 (patch)
treed7617ef6bccda28597f76f999ce8a3a82d1cb87a /libavformat/filmstripenc.c
parent37f0dbbc3911d315e12478535dcc7ea138d000ad (diff)
downloadffmpeg-073251316e1b0e4174a5aea41e8a3ce25590b165.tar.gz
avformat: Make init function out of write_header functions if possible
Also mark them as av_cold while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/filmstripenc.c')
-rw-r--r--libavformat/filmstripenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c
index ec9c814f8c..b5d9179ff3 100644
--- a/libavformat/filmstripenc.c
+++ b/libavformat/filmstripenc.c
@@ -32,7 +32,7 @@
#define RAND_TAG MKBETAG('R','a','n','d')
-static int write_header(AVFormatContext *s)
+static av_cold int init(AVFormatContext *s)
{
if (s->streams[0]->codecpar->format != AV_PIX_FMT_RGBA) {
av_log(s, AV_LOG_ERROR, "only AV_PIX_FMT_RGBA is supported\n");
@@ -69,7 +69,7 @@ const FFOutputFormat ff_filmstrip_muxer = {
.p.subtitle_codec = AV_CODEC_ID_NONE,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
- .write_header = write_header,
+ .init = init,
.write_packet = ff_raw_write_packet,
.write_trailer = write_trailer,
};