On 21/06/16 18:50, Anton Khirnov wrote:
> ---
>  avconv.c        | 76 
> +++++++++++++++++++++++++++++++++++++++++++--------------
>  avconv.h        |  7 ++++++
>  avconv_opt.c    | 10 ++++++++
>  doc/avconv.texi |  9 +++++++
>  4 files changed, 84 insertions(+), 18 deletions(-)

Is max_muxing_queue_size meant to be size in bytes or number of packets?

> +            int new_size = FFMIN(2 * av_fifo_size(ost->muxing_queue),
> +                                 ost->max_muxing_queue_size);
> +            if (new_size <= av_fifo_size(ost->muxing_queue)) {
> +                av_log(NULL, AV_LOG_ERROR,
> +                       "Too many packets buffered for output stream 
> %d:%d.\n",
> +                       ost->file_index, ost->st->index);
> +                exit_program(1);
> +            }
> +            ret = av_fifo_realloc2(ost->muxing_queue, new_size);
> +            if (ret < 0)
> +                exit_program(1);

Uses it as size in bytes.

> +    int max_muxing_queue_size;

"int" suggests number of packets rather than size in bytes, though not clear
(maybe a comment would help).

> +    ost->max_muxing_queue_size = 128 * sizeof(AVPacket);

That's size in bytes again.

> +    MATCH_PER_STREAM_OPT(max_muxing_queue_size, i, 
> ost->max_muxing_queue_size, oc, st);

Taking the user argument directly, and the documentation says...

> +    { "max_muxing_queue_size", HAS_ARG | OPT_INT | OPT_SPEC | OPT_EXPERT | 
> OPT_OUTPUT, { .off = OFFSET(max_muxing_queue_size) },
> +        "maximum number of packets that can be buffered while waiting for 
> all streams to initialize", "packets" },

Number of packets.

> +@item -max_muxing_queue_size @var{packets} (@emph{output,per-stream})
> +When transcoding audio and/or video streams, avconv will not begin writing 
> into
> +the output until it has one packet for each such stream. While waiting for 
> that
> +to happen, packets for other streams are buffered. This option sets the size 
> of
> +this buffer, in packets, for the matching output stream.
> +
> +The default value of this option should be high enough for most uses, so only
> +touch this option if you are sure that you need it.

Number of packets.

- Mark

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to