Opened 8 weeks ago
Closed 7 weeks ago
#11353 closed defect (fixed)
[Regression] "libswscale/utils.c" inadvertently 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)
Change History (5)
by , 8 weeks ago
comment:1 by , 8 weeks ago
Analyzed by developer: | set |
---|---|
Cc: | added |
Summary: | [PATCH] Bug introduced upon API change → [Regression] "libswscale/utils.c" potentially introduced logical error |
͏ Proposing patch:
-
libswscale/utils.c
a b SwsContext *sws_getCachedContext(SwsContext *prev, int srcW, 2548 2548 if (!param) 2549 2549 param = default_param; 2550 2550 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] && 2559 2559 prev->scaler_params[1] == param[1])) { 2560 2560 return prev; 2561 2561 }
comment:2 by , 7 weeks ago
comment:3 by , 7 weeks ago
Summary: | [Regression] "libswscale/utils.c" potentially introduced logical error → [Regression] "libswscale/utils.c" inadvertently introduced logical error |
---|
͏ So this is fixing the non-broken and footgun..?
͏ “This logic was inverted, but "||" was not replaced by "&&".”
Note:
See TracTickets
for help on using tickets.
patch swscale utils.c