On 9/30/12 12:07 AM, Luca Barbato wrote:
+ if (s->oformat->init) {
+ ret = s->oformat->init(s);
+ if (ret < 0)
+ return ret;
+ }
This construct seems to be used in a lot of places, may be
some define would clean up the code.
#define call_op(ctx, ops, func) \
do { \
if (ctx->ops->func) { \
ret = ctx->ops->func(ctx); \
if (ret < 0) \
return ret; \
} \
} while(0)
call_op(s, oformat, init);
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel