fftools/ffmpeg_mux_init: move allocation out of prologue

ost_add() has a very large variable declaration prologue, performing
"active" actions that can fail in there is confusing.
pull/389/head
Anton Khirnov 2 years ago
parent 4e366100e9
commit 38a2fc2c29
  1. 3
      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));

Loading…
Cancel
Save