mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
fftools/ffmpeg_enc: simplify error handling for decoded_side_data setup
There is no need to free the already-added items, they will be freed alongside the codec context. There is also little point in an error message, as the only reason this can fail is malloc failure.
This commit is contained in:
parent
6f2cb0923c
commit
8fc1e1358b
@ -198,15 +198,8 @@ int enc_open(void *opaque, const AVFrame *frame)
|
||||
&enc_ctx->nb_decoded_side_data,
|
||||
frame->side_data[i],
|
||||
AV_FRAME_SIDE_DATA_FLAG_UNIQUE);
|
||||
if (ret < 0) {
|
||||
av_frame_side_data_free(
|
||||
&enc_ctx->decoded_side_data,
|
||||
&enc_ctx->nb_decoded_side_data);
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"failed to configure video encoder: %s!\n",
|
||||
av_err2str(ret));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user