diff mbox series

[FFmpeg-devel] avfilter/ff_filter_frame_framed: Fix setting up filter frame

Message ID 20240226142101.401835-1-hanna.ciebiera@intel.com
State New
Headers show
Series [FFmpeg-devel] avfilter/ff_filter_frame_framed: Fix setting up filter frame | expand

Checks

Context Check Description
andriy/commit_msg_x86 warning Please wrap lines in the body of the commit message between 60 and 72 characters.
yinshiyou/commit_msg_loongarch64 warning Please wrap lines in the body of the commit message between 60 and 72 characters.
andriy/make_fate_x86 fail Make fate failed
andriy/make_x86 warning New warnings during build

Commit Message

Hanna Ciebiera Feb. 26, 2024, 2:21 p.m. UTC
Up to now filter_frame was incorrectly set up to dst->filter_frame in if statement. It was causing conversion failure during the transcoding.
Now, when condition in if statement is met filter_frame is set up to default_filter_frame.

Signed-off-by: Hanna Ciebiera <hanna.ciebiera@intel.com>
---
 libavfilter/avfilter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas George Feb. 26, 2024, 2:28 p.m. UTC | #1
Hanna Ciebiera (12024-02-26):
> Up to now filter_frame was incorrectly set up to dst->filter_frame in
> if statement. It was causing conversion failure during the
> transcoding.
> Now, when condition in if statement is met filter_frame is set up to
> default_filter_frame.
> 
> Signed-off-by: Hanna Ciebiera <hanna.ciebiera@intel.com>

Hi. This is completely wrong. And I am pretty sure with this patch the
compiler produces a new warning that tell that it is wrong.

Regards,
diff mbox series

Patch

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index ab7782862a..5da17f3160 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -951,7 +951,7 @@  static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
     AVFilterPad *dst = link->dstpad;
     int ret;
 
-    if (!(filter_frame = dst->filter_frame))
+    if (!(filter_frame == dst->filter_frame))
         filter_frame = default_filter_frame;
 
     if (dst->flags & AVFILTERPAD_FLAG_NEEDS_WRITABLE) {