From: Anton Khirnov <anton@khirnov.net> To: Ffmpeg Devel <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 31/92] Vulkan patchset part 1 - common code changes Date: Mon, 17 Apr 2023 11:46:43 +0200 Message-ID: <168172480343.3843.11801385323057244307@lain.khirnov.net> (raw) In-Reply-To: <NQTold9--3-9@lynne.ee> Quoting Lynne (2023-03-14 07:33:43) > From e37330cf6a1f768c733ca6d0b23b9e5847a5fe4f Mon Sep 17 00:00:00 2001 > From: Lynne <dev@lynne.ee> > Date: Thu, 10 Mar 2022 18:03:05 +0100 > Subject: [PATCH 25/92] avcodec: add AVHWAccel.free_frame_priv callback > diff --git a/libavcodec/decode.c b/libavcodec/decode.c > index d1ba7f167f..c4630ce275 100644 > --- a/libavcodec/decode.c > +++ b/libavcodec/decode.c > @@ -1685,3 +1685,22 @@ int ff_copy_palette(void *dst, const AVPacket *src, void *logctx) > } > return 0; > } > + > +AVBufferRef *ff_alloc_hwaccel_frame_priv_data(AVCodecContext *avctx, Sane-endian naming please. ff_hwaccel_frame_priv_alloc(). > + const AVHWAccel *hwaccel) > +{ > + AVBufferRef *ref; > + uint8_t *data = av_mallocz(hwaccel->frame_priv_data_size); > + if (!data) > + return NULL; > + > + ref = av_buffer_create(data, hwaccel->frame_priv_data_size, > + (void (*)(void *, uint8_t *))hwaccel->free_frame_priv, I believe the cast is UB and you should convert the arguments in the function itself, or add a trivial wrapper here. -- Anton Khirnov _______________________________________________ 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".
next prev parent reply other threads:[~2023-04-17 9:46 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-14 6:33 Lynne 2023-03-14 11:51 ` James Almer 2023-03-15 19:41 ` Lynne 2023-04-16 19:21 ` Anton Khirnov 2023-04-16 19:26 ` Anton Khirnov 2023-04-16 20:38 ` Anton Khirnov 2023-04-17 9:07 ` Anton Khirnov 2023-04-19 14:47 ` Lynne 2023-04-22 12:38 ` Anton Khirnov 2023-04-24 8:27 ` Lynne 2023-04-17 9:25 ` Anton Khirnov 2023-04-19 14:39 ` Lynne 2023-04-22 12:41 ` Anton Khirnov 2023-04-24 8:26 ` Lynne 2023-04-17 9:46 ` Anton Khirnov [this message] 2023-04-19 14:49 ` Lynne
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=168172480343.3843.11801385323057244307@lain.khirnov.net \ --to=anton@khirnov.net \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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