mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
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.
This commit is contained in:
parent
4e366100e9
commit
38a2fc2c29
@ -987,13 +987,14 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o,
|
|||||||
MuxStream *ms;
|
MuxStream *ms;
|
||||||
OutputStream *ost;
|
OutputStream *ost;
|
||||||
const AVCodec *enc;
|
const AVCodec *enc;
|
||||||
AVStream *st = avformat_new_stream(oc, NULL);
|
AVStream *st;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
const char *bsfs = NULL, *time_base = NULL;
|
const char *bsfs = NULL, *time_base = NULL;
|
||||||
char *filters = NULL, *next, *codec_tag = NULL;
|
char *filters = NULL, *next, *codec_tag = NULL;
|
||||||
double qscale = -1;
|
double qscale = -1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
st = avformat_new_stream(oc, NULL);
|
||||||
if (!st)
|
if (!st)
|
||||||
report_and_exit(AVERROR(ENOMEM));
|
report_and_exit(AVERROR(ENOMEM));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user