diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-11-25 10:13:52 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-11-25 10:23:19 +0100 |
commit | 2ad199ae3131e9410e5c0c6a0e143dbd22973d02 (patch) | |
tree | aade1ede485e12937a95e5e62cdb79c752be0987 /libavformat/wavenc.c | |
parent | 1ff9c07fa696443d2d243e45d5794c8b19946a1b (diff) | |
download | ffmpeg-2ad199ae3131e9410e5c0c6a0e143dbd22973d02.tar.gz |
avformat/wavenc: w64 muxer supports only 1 stream
Diffstat (limited to 'libavformat/wavenc.c')
-rw-r--r-- | libavformat/wavenc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index b08f862cf9..3531a8f909 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -527,6 +527,16 @@ const AVOutputFormat ff_wav_muxer = { #if CONFIG_W64_MUXER #include "w64.h" +static av_cold int w64_init(AVFormatContext *ctx) +{ + if (ctx->nb_streams != 1) { + av_log(ctx, AV_LOG_ERROR, "This muxer only supports a single stream.\n"); + return AVERROR(EINVAL); + } + + return 0; +} + static void start_guid(AVIOContext *pb, const uint8_t *guid, int64_t *pos) { *pos = avio_tell(pb); @@ -612,6 +622,7 @@ const AVOutputFormat ff_w64_muxer = { .priv_data_size = sizeof(WAVMuxContext), .audio_codec = AV_CODEC_ID_PCM_S16LE, .video_codec = AV_CODEC_ID_NONE, + .init = w64_init, .write_header = w64_write_header, .write_packet = wav_write_packet, .write_trailer = w64_write_trailer, |