On Sat, Jun 11, 2016 at 11:54:31PM +0200, Marton Balint wrote: > > > On Sat, 11 Jun 2016, Michael Niedermayer wrote: > > >On Sat, Jun 11, 2016 at 08:33:42PM +0200, Marton Balint wrote: > >>Signed-off-by: Marton Balint <c...@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 ? > > I can change it, but I found it a little less readable.
then better to leave it [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel