Opened 3 hours ago

Last modified 74 minutes ago

#11353 new defect

[Regression] "libswscale/utils.c" potentially introduced logical error

Reported by: sylware Owned by:
Priority: critical Component: swscale
Version: git-master Keywords:
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

Please, test more before committing.

See patch.

Attachments (1)

p (1.2 KB ) - added by sylware 3 hours ago.
patch swscale utils.c

Download all attachments as: .zip

Change History (2)

by sylware, 3 hours ago

Attachment: p added

patch swscale utils.c

comment:1 by MasterQuestionable, 74 minutes ago

Analyzed by developer: set
Cc: MasterQuestionable added
Summary: [PATCH] Bug introduced upon API change[Regression] "libswscale/utils.c" potentially introduced logical error

͏    Relevant:
͏    https://github.com/FFmpeg/FFmpeg/commit/ed5dd675624c83d9c69b406ce30e4e09f29970e3#diff-29d45229c3c98e9f43a9ce70f75b626cb66a8297d680d6fe6f7bba1a54b9c9b4R2552

͏    Proposing patch:

  • libswscale/utils.c

    a b SwsContext *sws_getCachedContext(SwsContext *prev, int srcW,  
    25482548    if (!param)
    25492549        param = default_param;
    25502550
    2551     if (prev && (prev->src_w            == srcW      ||
    2552                  prev->src_h            == srcH      ||
    2553                  prev->src_format       == srcFormat ||
    2554                  prev->dst_w            == dstW      ||
    2555                  prev->dst_h            == dstH      ||
    2556                  prev->dst_format       == dstFormat ||
    2557                  prev->flags            == flags     ||
    2558                  prev->scaler_params[0] == param[0]  ||
     2551    if (prev && (prev->src_w            == srcW      &&
     2552                 prev->src_h            == srcH      &&
     2553                 prev->src_format       == srcFormat &&
     2554                 prev->dst_w            == dstW      &&
     2555                 prev->dst_h            == dstH      &&
     2556                 prev->dst_format       == dstFormat &&
     2557                 prev->flags            == flags     &&
     2558                 prev->scaler_params[0] == param[0]  &&
    25592559                 prev->scaler_params[1] == param[1])) {
    25602560        return prev;
    25612561    }
Note: See TracTickets for help on using tickets.