diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-07-14 13:47:23 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-07-20 20:40:26 +0200 |
commit | 6c6f13baf3649bd4e59bd1054721c2257f8c3159 (patch) | |
tree | 5565b54190a1073a2ec57cb15ff143ce734ec8a2 /fftools/ffmpeg_mux_init.c | |
parent | 2e6afa799ef693b94f993f54ed41a84f6d9f1685 (diff) | |
download | ffmpeg-6c6f13baf3649bd4e59bd1054721c2257f8c3159.tar.gz |
fftools/ffmpeg: return errors from find_codec_or_die() instead of aborting
Rename the function to just find_codec().
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r-- | fftools/ffmpeg_mux_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index eccdae1014..6a8a1c7b63 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -139,7 +139,9 @@ static int choose_encoder(const OptionsContext *o, AVFormatContext *s, return AVERROR_ENCODER_NOT_FOUND; } } else if (strcmp(codec_name, "copy")) { - *enc = find_codec_or_die(ost, codec_name, ost->type, 1); + int ret = find_codec(ost, codec_name, ost->type, 1, enc); + if (ret < 0) + return ret; ost->par_in->codec_id = (*enc)->id; } |