Commit 4930cd13 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: check av_opt_set_dict() return

Fixes CID1224275
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 79d3eeb2
...@@ -2864,7 +2864,11 @@ static int transcode_init(void) ...@@ -2864,7 +2864,11 @@ static int transcode_init(void)
av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low."
" It takes bits/s as argument, not kbits/s\n"); " It takes bits/s as argument, not kbits/s\n");
} else { } 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); ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment