On 04/09/2012 12:23 AM, Anton Khirnov wrote:

> Prevents extensive buffering when overlaying a single picture.
> ---
>  avconv.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/avconv.c b/avconv.c
> index a94c8b1..181fe42 100644
> --- a/avconv.c
> +++ b/avconv.c
> @@ -3004,6 +3004,13 @@ static int transcode(OutputFile *output_files,
>          }
>          if (ret < 0) {
>              input_files[file_index].eof_reached = 1;
> +
> +            for (i = 0; i < input_files[file_index].nb_streams; i++) {
> +                ist = &input_streams[input_files[file_index].ist_index + i];
> +                if (ist->decoding_needed)
> +                    output_packet(ist, output_streams, nb_output_streams, 
> NULL);
> +            }
> +
>              if (opt_shortest)
>                  break;
>              else
> @@ -3077,7 +3084,7 @@ static int transcode(OutputFile *output_files,
>      /* at the end of stream, we must flush the decoder buffers */
>      for (i = 0; i < nb_input_streams; i++) {
>          ist = &input_streams[i];
> -        if (ist->decoding_needed) {
> +        if (!input_files[ist->file_index].eof_reached && 
> ist->decoding_needed) {
>              output_packet(ist, output_streams, nb_output_streams, NULL);
>          }
>      }


LGTM

-Justin

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

Reply via email to