You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ffmpeg: Check avcodec_parameters_to_context() for failure
Fixes CID1396241 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
3
ffmpeg.c
3
ffmpeg.c
@@ -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,
|
||||||
|
Reference in New Issue
Block a user