Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-02 07:20:26 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-07-02 07:53:13 +0400
commit4930cd13d634d5f4e284de3a955d5c6a84fd65e2 (patch)
treedbe480fb8948d404c4bf8a4f79518a863fad4876 /ffmpeg.c
parent79d3eeb2b7ba6061d74099ffdb804f59a5655783 (diff)
ffmpeg: check av_opt_set_dict() return
Fixes CID1224275 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 3d23ee6861..4941c840ce 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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);