Commit 11103a49 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: Check avcodec_parameters_to_context() for failure

Fixes CID1396241
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2f347c17
...@@ -2877,7 +2877,8 @@ static int init_output_stream_streamcopy(OutputStream *ost) ...@@ -2877,7 +2877,8 @@ static int init_output_stream_streamcopy(OutputStream *ost)
av_assert0(ist && !ost->filter); av_assert0(ist && !ost->filter);
avcodec_parameters_to_context(ost->enc_ctx, ist->st->codecpar); ret = avcodec_parameters_to_context(ost->enc_ctx, ist->st->codecpar);
if (ret >= 0)
ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts); ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts);
if (ret < 0) { if (ret < 0) {
av_log(NULL, AV_LOG_FATAL, av_log(NULL, AV_LOG_FATAL,
......
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