* [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
@ 2022-06-27 10:02 Ting Fu
2022-06-27 11:03 ` Paul B Mahol
0 siblings, 1 reply; 6+ messages in thread
From: Ting Fu @ 2022-06-27 10:02 UTC (permalink / raw)
To: ffmpeg-devel
This issue would cause segmetaion fault when running srcnn model with
sr filter by TensorFlow backend. This filter would free the frame incorectly.
Signed-off-by: Ting Fu <ting.fu@intel.com>
---
libavfilter/vf_sr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index 0890c8ba18..cb24c096ce 100644
--- a/libavfilter/vf_sr.c
+++ b/libavfilter/vf_sr.c
@@ -159,8 +159,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
sws_scale(ctx->sws_uv_scale, (const uint8_t **)(in->data + 2), in->linesize + 2,
0, ctx->sws_uv_height, out->data + 2, out->linesize + 2);
}
-
- av_frame_free(&in);
+ if (in != out) {
+ av_frame_free(&in);
+ }
return ff_filter_frame(outlink, out);
}
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
2022-06-27 10:02 [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free Ting Fu
@ 2022-06-27 11:03 ` Paul B Mahol
2022-07-21 9:57 ` Fu, Ting
0 siblings, 1 reply; 6+ messages in thread
From: Paul B Mahol @ 2022-06-27 11:03 UTC (permalink / raw)
To: FFmpeg development discussions and patches
lgtm
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
2022-06-27 11:03 ` Paul B Mahol
@ 2022-07-21 9:57 ` Fu, Ting
2022-07-22 0:41 ` Guo, Yejun
0 siblings, 1 reply; 6+ messages in thread
From: Fu, Ting @ 2022-07-21 9:57 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Kindly ping
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Paul B
> Mahol
> Sent: Monday, June 27, 2022 07:03 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused
> by incorrect input frame free.
>
> lgtm
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org
> with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
2022-07-21 9:57 ` Fu, Ting
@ 2022-07-22 0:41 ` Guo, Yejun
2022-07-22 5:22 ` Andreas Rheinhardt
0 siblings, 1 reply; 6+ messages in thread
From: Guo, Yejun @ 2022-07-22 0:41 UTC (permalink / raw)
To: FFmpeg development discussions and patches
-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Fu, Ting
Sent: 2022年7月21日 17:57
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
Kindly ping
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Paul
> B Mahol
> Sent: Monday, June 27, 2022 07:03 PM
> To: FFmpeg development discussions and patches
> <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation
> fault caused by incorrect input frame free.
>
> lgtm
Thanks, and lgtm, will push soon.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
2022-07-22 0:41 ` Guo, Yejun
@ 2022-07-22 5:22 ` Andreas Rheinhardt
2022-07-22 5:31 ` Gyan Doshi
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Rheinhardt @ 2022-07-22 5:22 UTC (permalink / raw)
To: ffmpeg-devel
Guo, Yejun:
>
>
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Fu, Ting
> Sent: 2022年7月21日 17:57
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
>
> Kindly ping
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Paul
>> B Mahol
>> Sent: Monday, June 27, 2022 07:03 PM
>> To: FFmpeg development discussions and patches
>> <ffmpeg-devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation
>> fault caused by incorrect input frame free.
>>
>> lgtm
>
> Thanks, and lgtm, will push soon.
Fix the commit message when you do: lavf commonly means libavformat;
libavfilter is lavfi.
- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
2022-07-22 5:22 ` Andreas Rheinhardt
@ 2022-07-22 5:31 ` Gyan Doshi
0 siblings, 0 replies; 6+ messages in thread
From: Gyan Doshi @ 2022-07-22 5:31 UTC (permalink / raw)
To: ffmpeg-devel
On 2022-07-22 10:52 am, Andreas Rheinhardt wrote:
> Guo, Yejun:
>>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Fu, Ting
>> Sent: 2022年7月21日 17:57
>> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.
>>
>> Kindly ping
>>
>>> -----Original Message-----
>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Paul
>>> B Mahol
>>> Sent: Monday, June 27, 2022 07:03 PM
>>> To: FFmpeg development discussions and patches
>>> <ffmpeg-devel@ffmpeg.org>
>>> Subject: Re: [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation
>>> fault caused by incorrect input frame free.
>>>
>>> lgtm
>> Thanks, and lgtm, will push soon.
> Fix the commit message when you do: lavf commonly means libavformat;
> libavfilter is lavfi.
This was pushed 5 hours ago, as-is.
Regard,
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-22 5:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 10:02 [FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free Ting Fu
2022-06-27 11:03 ` Paul B Mahol
2022-07-21 9:57 ` Fu, Ting
2022-07-22 0:41 ` Guo, Yejun
2022-07-22 5:22 ` Andreas Rheinhardt
2022-07-22 5:31 ` Gyan Doshi
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git