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

Martin Storsjö martin at martin.st
Thu Aug 27 13:11:03 CEST 2015


On Thu, 27 Aug 2015, 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;
> +

If this is done here, it should also be done in av_write_frame in the same 
way.

// Martin


More information about the libav-devel mailing list