diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-07 20:58:27 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-18 06:01:33 +0100 |
commit | 5f4b0ace4be25e4d85b081c8d80b8748945a44c1 (patch) | |
tree | bc7ff4e00d299685d7646ee74b69e3498d09b500 | |
parent | ea81c23c942088bf7099f176ac3cd0b993b64779 (diff) | |
download | ffmpeg-5f4b0ace4be25e4d85b081c8d80b8748945a44c1.tar.gz |
avformat/mxfenc: Make init function out of write_header
The MXF muxers only write the header after they have received
a packet; the actual write_header function does not write anything.
So make an init function out of it.
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/mxfenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index d84cb6dd29..2f363917fc 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -2500,7 +2500,7 @@ static int mxf_init_timecode(AVFormatContext *s, AVStream *st, AVRational tbc) return av_timecode_init(&mxf->tc, av_inv_q(tbc), 0, 0, s); } -static int mxf_write_header(AVFormatContext *s) +static int mxf_init(AVFormatContext *s) { MXFContext *mxf = s->priv_data; int i, ret; @@ -3245,7 +3245,7 @@ const AVOutputFormat ff_mxf_muxer = { .priv_data_size = sizeof(MXFContext), .audio_codec = AV_CODEC_ID_PCM_S16LE, .video_codec = AV_CODEC_ID_MPEG2VIDEO, - .write_header = mxf_write_header, + .init = mxf_init, .write_packet = mxf_write_packet, .write_trailer = mxf_write_footer, .deinit = mxf_deinit, @@ -3261,7 +3261,7 @@ const AVOutputFormat ff_mxf_d10_muxer = { .priv_data_size = sizeof(MXFContext), .audio_codec = AV_CODEC_ID_PCM_S16LE, .video_codec = AV_CODEC_ID_MPEG2VIDEO, - .write_header = mxf_write_header, + .init = mxf_init, .write_packet = mxf_write_packet, .write_trailer = mxf_write_footer, .deinit = mxf_deinit, @@ -3278,7 +3278,7 @@ const AVOutputFormat ff_mxf_opatom_muxer = { .priv_data_size = sizeof(MXFContext), .audio_codec = AV_CODEC_ID_PCM_S16LE, .video_codec = AV_CODEC_ID_DNXHD, - .write_header = mxf_write_header, + .init = mxf_init, .write_packet = mxf_write_packet, .write_trailer = mxf_write_footer, .deinit = mxf_deinit, |