[FFmpeg-devel] [PATCH] Making process of uuid-xmp faster.
Chen Meng
mengchen.mc at alibaba-inc.com
Tue Nov 8 17:05:14 EET 2016
Thx for reply.I've tried to add error code in return.
此致——————————孟辰(阏逢) 阿里云事业群-飞天事业部-视频服务Eml: mengchen.mc at alibaba-inc.comMob: +86-1316-257-5752 | Tel: 021-5255-9888.71048Adr: 上海市浦东新区杨高南路759号陆家嘴世纪金融广场2号楼15层
------------------------------------------------------------------From:Michael Niedermayer <michael at niedermayer.cc>Time:2016 Nov 8 (Tue) 20:10To:FFmpeg development discussions and patches <ffmpeg-devel at 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 at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list