diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-06-19 12:23:44 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-07-28 16:37:16 +0200 |
commit | 1cd60d3b3511539ee41a94075f7f90b6d25ac2c5 (patch) | |
tree | 7de5b1cc51d1fbce8dd073e45392bb1d93ac7e3d | |
parent | c2f2dd0296250dceb9a8e7afabc24b8717989cf3 (diff) |
fftools/ffmpeg: remove an unnecessary avcodec_close() call
No encoders can possibly be opened at this point. And even if some were,
they would be closed in ffmpeg_cleanup().
-rw-r--r-- | fftools/ffmpeg.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d9794eb958..9b50c8b26c 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3344,13 +3344,8 @@ static int transcode_init(void) /* init input streams */ for (i = 0; i < nb_input_streams; i++) - if ((ret = init_input_stream(i, error, sizeof(error))) < 0) { - for (i = 0; i < nb_output_streams; i++) { - ost = output_streams[i]; - avcodec_close(ost->enc_ctx); - } + if ((ret = init_input_stream(i, error, sizeof(error))) < 0) goto dump_format; - } /* * initialize stream copy and subtitle/data streams. |