1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-04 09:37:53 +02:00

ffmpeg: check av_opt_set_dict() return

Fixes CID1224275

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-07-02 05:20:26 +02:00
parent 79d3eeb2b7
commit 4930cd13d6

View File

@ -2864,7 +2864,11 @@ static int transcode_init(void)
av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low."
" It takes bits/s as argument, not kbits/s\n");
} else {
av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts);
if (av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts) < 0) {
av_log(NULL, AV_LOG_FATAL,
"Error setting up codec context options.\n");
exit_program(1);
}
}
ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);