[FFmpeg-devel] [PATCH] lavf: Add support for WebM Live Muxing
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Mar 30 22:00:44 CEST 2015
Vignesh Venkatasubramanian <vigneshv <at> google.com> writes:
> + if (!wc->oformat) { return AVERROR_MUXER_NOT_FOUND; }
It is your file but most people here seem to agree
that the following is more (and not less) readable:
if (!wc->oformat)
return AVERROR_MUXER_NOT_FOUND;
> + if ((ret = chunk_mux_init(s)) < 0) { return ret; }
It is your decision but not merging assignment and
comparison is common practice here: I suspect both
for readability and because it saves a lot of time
debugging...
> + oc->streams = NULL;
> + oc->nb_streams = 0;
> + avformat_free_context(oc);
> + oc->streams = NULL;
> + oc->nb_streams = 0;
> + avformat_free_context(oc);
The first two seem unnecessary if you call
avformat_free_context().
Carl Eugen
More information about the ffmpeg-devel
mailing list