On Wed, Apr 08, 2015 at 07:16:36PM +0200, Gilles Chanteperdrix wrote: > avoid calling cleanup functions on uninitialized variables > > Signed-off-by: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> > --- > libavformat/libquvi.c | 41 +++++++++++++++++++++++++---------------- > 1 file changed, 25 insertions(+), 16 deletions(-) > > diff --git a/libavformat/libquvi.c b/libavformat/libquvi.c > index 7c5f7a2..e838b34 100644 > --- a/libavformat/libquvi.c > +++ b/libavformat/libquvi.c > @@ -63,28 +63,38 @@ static int libquvi_read_header(AVFormatContext *s) > char *media_url, *pagetitle; > > rc = quvi_init(&q); > - if (rc != QUVI_OK) > - goto quvi_fail; > + if (rc != QUVI_OK) { > + av_log(s, AV_LOG_ERROR, "%s\n", quvi_strerror(q, rc)); > + return AVERROR_EXTERNAL; > + }
is quvi_strerror() thread safe ? also tabs [...] -- 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