[FFmpeg-devel] [PATCH 3/4] avformat/mux: do not call write_header multiple times if it fails the first time
Michael Niedermayer
michael at niedermayer.cc
Sat Jun 11 22:59:51 CEST 2016
On Sat, Jun 11, 2016 at 08:33:42PM +0200, Marton Balint wrote:
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavformat/internal.h | 1 +
> libavformat/mux.c | 5 +++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/internal.h b/libavformat/internal.h
> index 40ba089..b6c2020 100644
> --- a/libavformat/internal.h
> +++ b/libavformat/internal.h
> @@ -124,6 +124,7 @@ struct AVFormatInternal {
> * Whether or not a header has already been written
> */
> int header_written;
> + int write_header_ret;
> };
>
> struct AVStreamInternal {
> diff --git a/libavformat/mux.c b/libavformat/mux.c
> index 08ed940..b1b65a1 100644
> --- a/libavformat/mux.c
> +++ b/libavformat/mux.c
> @@ -479,6 +479,7 @@ static int write_header_internal(AVFormatContext *s)
> int ret = s->oformat->write_header(s);
> if (ret >= 0 && s->pb && s->pb->error < 0)
> ret = s->pb->error;
> + s->internal->write_header_ret = ret;
would
header_written = ret
be simpler ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160611/6c8b3420/attachment.sig>
More information about the ffmpeg-devel
mailing list