[FFmpeg-devel] Dubious rounding in ffplay.c

Nigel Touati-Evans nigel
Fri Aug 29 15:05:00 CEST 2008


Hi, in video_image_display in ffplay.c, there are lines:

        height = is->height;
        width = ((int)rint(height * aspect_ratio)) & -3;
        if (width > is->width) {
            width = is->width;
            height = ((int)rint(width / aspect_ratio)) & -3;
        }

Surely the &-3 should either be &-2 or &-4 (ie &~1 or &~3) depending
on whether the intention is to obtain a multiple of 4 or 2.

Nigel




More information about the ffmpeg-devel mailing list