Thx for reply.I've tried to add error code in return. 此致——————————孟辰(阏逢) 阿里云事业群-飞天事业部-视频服务Eml: mengchen.mc@alibaba-inc.comMob: +86-1316-257-5752 | Tel: 021-5255-9888.71048Adr: 上海市浦东新区杨高南路759号陆家嘴世纪金融广场2号楼15层 ------------------------------------------------------------------From:Michael Niedermayer <mich...@niedermayer.cc>Time:2016 Nov 8 (Tue) 20:10To:FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>Subject:Re: [FFmpeg-devel] [PATCH] Making process of uuid-xmp faster. On Tue, Nov 08, 2016 at 04:34:13PM +0800, Chen Meng wrote: > --- > libavformat/mov.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index f06de06..388cd1f 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -4533,13 +4533,20 @@ static int mov_read_uuid(MOVContext *c, AVIOContext >*pb, MOVAtom atom) > if (!buffer) { > return AVERROR(ENOMEM); > } > - ret = avio_read(pb, buffer, len); > + > + if (c->export_xmp) { > + ret = avio_read(pb, buffer, len); > + if (ret != len) { > + av_free(buffer); > + return AVERROR_INVALIDDATA; > + }
this looses the error code in ret [...] -- 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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel