[FFmpeg-devel] [PATCH 1/8] libavformat/dashenc: use avio_dynbuf instead of packet_write callback

Moritz Barsnick barsnick at gmx.net
Sat Jan 21 23:53:56 EET 2017


On Sat, Jan 21, 2017 at 15:39:02 +0100, Peter Große wrote:

I do understand that some of this code may be copied or adhering to the
code style near it, but just some style nits anyway:

> +    if(!os->ctx->pb) {
> +        return AVERROR(EINVAL);
> +    }

When adding new code, please stick to "if (" with a space. (Also in
some of your other patches.)

> +        ret = avio_open_dyn_buf(&ctx->pb);
> +        if (ret < 0)
> +            return ret;

and

> +        if ((ret = flush_dynbuf(os, &range_length)) < 0) {
> +            dash_free(s);
> +            return ret;
> +        }

Two different ways of doing the same thing. ;-) (Assignment to ret
embedded in the "if"-clause versus before it.)

Just saying,
Moritz


More information about the ffmpeg-devel mailing list