On Wed, Dec 07, 2011 at 01:06:43AM +0100, Luca Barbato wrote:
> It behaves similarly to image2 muxer
similar to the
But maybe you could describe it in a sentence or two instead. I don't
remember offhand what the image2 muxer did.
> ---
> doc/muxers.texi | 27 +++++
> libavformat/Makefile | 1 +
> libavformat/allformats.c | 1 +
> libavformat/segment.c | 249
> ++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 278 insertions(+), 0 deletions(-)
> create mode 100644 libavformat/segment.c
Changelog entry, possibly docs update.
> --- /dev/null
> +++ b/libavformat/segment.c
> @@ -0,0 +1,249 @@
> +
> +#include "libavutil/avstring.h"
> +#include "libavutil/log.h"
> +#include "libavutil/opt.h"
> +#include "libavutil/mathematics.h"
> +#include "libavutil/parseutils.h"
> +#include "avformat.h"
> +#include "internal.h"
> +#include <strings.h>
> +#include <float.h>
Place system headers before local headers, ideally separated by an empty line.
> +#if CONFIG_SEGMENT_MUXER
This is unnecessary due to the conditional compilation.
> + if ((err = avio_open(&oc->pb, oc->filename, AVIO_FLAG_WRITE)) < 0) {
> + return err;
> + }
pointless {}
> + seg->number = 0;
> + seg->recording_time = seg->time*1000000;
> + seg->offset_time = 0;
align
> + if (seg->list) {
> + if ((ret = avio_open(&s->pb, seg->list, AVIO_FLAG_WRITE)) < 0) {
> + return ret;
> + }
> + }
pointless {}, more below
> + oc->streams = s->streams;
> + oc->nb_streams = s->nb_streams;
align
> + fail:
Place goto labels in column 0.
> + if (ret) {
> + oc->streams = NULL;
> + oc->nb_streams = 0;
align
> +/* output */
> +#if CONFIG_SEGMENT_MUXER
> +AVOutputFormat ff_segment_muxer = {
see above - and the comment appears pointless or mystifying.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel