[libav-devel] [PATCH 2/2] mux: properly forward errors from av_interleaved_write_frame()

Luca Barbato lu_zero at gentoo.org
Thu Aug 27 11:48:04 CEST 2015


On 27/08/15 06:04, Sean McGovern wrote:
> Bug-Id: 881
> 
> CC: libav-stable at libav.org
> ---
>  libavformat/mux.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/mux.c b/libavformat/mux.c
> index 3cff264..cae8f19 100644
> --- a/libavformat/mux.c
> +++ b/libavformat/mux.c
> @@ -591,6 +591,9 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
>          if (ret >= 0)
>              s->streams[opkt.stream_index]->nb_frames++;
>  
> +        if (ret >= 0 && s->pb && s->pb->error < 0)
> +            ret = s->pb->error;
> +
>          av_free_packet(&opkt);
>  
>          if (ret < 0)
> 

I'd change the patch message in

mux: Account for the fact is possible to run out of space

The patch is ok.

lu


More information about the libav-devel mailing list