ost_add() has a very large variable declaration prologue, performing
"active" actions that can fail in there is confusing.
---
fftools/ffmpeg_mux_init.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 8e640610cd..bd4c0a9f97 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -987,13 +987,14 @@ static OutputStream *ost_add(Muxer *mux, const
OptionsContext *o,
MuxStream *ms;
OutputStream *ost;
const AVCodec *enc;
- AVStream *st = avformat_new_stream(oc, NULL);
+ AVStream *st;
int ret = 0;
const char *bsfs = NULL, *time_base = NULL;
char *filters = NULL, *next, *codec_tag = NULL;
double qscale = -1;
int i;
+ st = avformat_new_stream(oc, NULL);
if (!st)
report_and_exit(AVERROR(ENOMEM));
--
2.40.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".