[FFmpeg-devel] [PATCH] avformat/mov: Propagate errors in mov_switch_root.

Moritz Barsnick barsnick at gmx.net
Sat Nov 18 03:55:08 EET 2017


On Thu, Nov 16, 2017 at 16:28:22 -0800, Jacob Trimble wrote:
> -    if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||
> -        avio_feof(s->pb))
> +    if ((ret = mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX })) < 0)
> +        return ret;
> +    if (avio_feof(s->pb))
>          return AVERROR_EOF;

The recommendation is to use:

    ret = mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX });
    if (ret < 0)
        return ret;

in new code.

Moritz


More information about the ffmpeg-devel mailing list