* [FFmpeg-devel] [PATCH] avcodec/noise_bsf: Check for wrapped frames
@ 2023-06-04 18:07 Michael Niedermayer
2023-06-04 18:13 ` Michael Niedermayer
0 siblings, 1 reply; 4+ messages in thread
From: Michael Niedermayer @ 2023-06-04 18:07 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Wrapped frames contain pointers so they need specific code to
noise them, the generic code would lead to segfaults
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/noise_bsf.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c
index 168f3aa373..8c30ab48ab 100644
--- a/libavcodec/noise_bsf.c
+++ b/libavcodec/noise_bsf.c
@@ -80,6 +80,11 @@ static int noise_init(AVBSFContext *ctx)
NoiseContext *s = ctx->priv_data;
int ret;
+ if (ctx->par_in->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
+ av_log(ctx, AV_LOG_ERROR, "Wrapped AVFrame noising is unsupported\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
if (!s->amount_str) {
s->amount_str = (!s->drop_str && !s->dropamount) ? av_strdup("-1") : av_strdup("0");
if (!s->amount_str)
--
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/noise_bsf: Check for wrapped frames
2023-06-04 18:07 [FFmpeg-devel] [PATCH] avcodec/noise_bsf: Check for wrapped frames Michael Niedermayer
@ 2023-06-04 18:13 ` Michael Niedermayer
2023-06-04 18:36 ` Gyan Doshi
0 siblings, 1 reply; 4+ messages in thread
From: Michael Niedermayer @ 2023-06-04 18:13 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 578 bytes --]
On Sun, Jun 04, 2023 at 08:07:25PM +0200, Michael Niedermayer wrote:
> Wrapped frames contain pointers so they need specific code to
> noise them, the generic code would lead to segfaults
>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/noise_bsf.c | 5 +++++
> 1 file changed, 5 insertions(+)
I intend to apply this soon as noising pointers is not too good
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/noise_bsf: Check for wrapped frames
2023-06-04 18:13 ` Michael Niedermayer
@ 2023-06-04 18:36 ` Gyan Doshi
2023-06-04 19:54 ` Michael Niedermayer
0 siblings, 1 reply; 4+ messages in thread
From: Gyan Doshi @ 2023-06-04 18:36 UTC (permalink / raw)
To: ffmpeg-devel
On 2023-06-04 11:43 pm, Michael Niedermayer wrote:
> On Sun, Jun 04, 2023 at 08:07:25PM +0200, Michael Niedermayer wrote:
>> Wrapped frames contain pointers so they need specific code to
>> noise them, the generic code would lead to segfaults
>>
>> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
>> ---
>> libavcodec/noise_bsf.c | 5 +++++
>> 1 file changed, 5 insertions(+)
> I intend to apply this soon as noising pointers is not too good
Their contents can't be manipulated but they can still be dropped
conditionally, so the bsf can still handle them if amount_str is NULL.
Regards,
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/noise_bsf: Check for wrapped frames
2023-06-04 18:36 ` Gyan Doshi
@ 2023-06-04 19:54 ` Michael Niedermayer
0 siblings, 0 replies; 4+ messages in thread
From: Michael Niedermayer @ 2023-06-04 19:54 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 920 bytes --]
On Mon, Jun 05, 2023 at 12:06:15AM +0530, Gyan Doshi wrote:
>
>
> On 2023-06-04 11:43 pm, Michael Niedermayer wrote:
> > On Sun, Jun 04, 2023 at 08:07:25PM +0200, Michael Niedermayer wrote:
> > > Wrapped frames contain pointers so they need specific code to
> > > noise them, the generic code would lead to segfaults
> > >
> > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > > ---
> > > libavcodec/noise_bsf.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > I intend to apply this soon as noising pointers is not too good
>
> Their contents can't be manipulated but they can still be dropped
> conditionally, so the bsf can still handle them if amount_str is NULL.
ok, ive sent a new patch
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2023-06-04 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-04 18:07 [FFmpeg-devel] [PATCH] avcodec/noise_bsf: Check for wrapped frames Michael Niedermayer
2023-06-04 18:13 ` Michael Niedermayer
2023-06-04 18:36 ` Gyan Doshi
2023-06-04 19:54 ` Michael Niedermayer
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