[FFmpeg-devel] [PATCH 2/2] avutil/hwcontext_videotoolbox: fix declaration-after-statement
"zhilizhao(赵志立)"
quinkblack at foxmail.com
Thu Mar 17 05:35:11 EET 2022
Feel free to drop this one, there is no real gain.
> On Mar 10, 2022, at 12:37 PM, Zhao Zhili <quinkblack at foxmail.com> wrote:
>
> ---
> libavutil/hwcontext_videotoolbox.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
> index e442a95007..13f77a7692 100644
> --- a/libavutil/hwcontext_videotoolbox.c
> +++ b/libavutil/hwcontext_videotoolbox.c
> @@ -161,11 +161,11 @@ uint32_t av_map_videotoolbox_format_from_pixfmt2(enum AVPixelFormat pix_fmt, boo
>
> static int vt_pool_alloc(AVHWFramesContext *ctx)
> {
> - VTFramesContext *fctx = ctx->internal->priv;
> CVReturn err;
> CFNumberRef w, h, pixfmt;
> uint32_t cv_pixfmt;
> CFMutableDictionaryRef attributes, iosurface_properties;
> + VTFramesContext *fctx = ctx->internal->priv;
>
> attributes = CFDictionaryCreateMutable(
> NULL,
> @@ -589,13 +589,13 @@ int av_vt_pixbuf_set_attachments(void *log_ctx,
> static int vt_map_frame(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src,
> int flags)
> {
> - CVPixelBufferRef pixbuf = (CVPixelBufferRef)src->data[3];
> - OSType pixel_format = CVPixelBufferGetPixelFormatType(pixbuf);
> CVReturn err;
> - uint32_t map_flags = 0;
> int ret;
> int i;
> enum AVPixelFormat format;
> + CVPixelBufferRef pixbuf = (CVPixelBufferRef)src->data[3];
> + OSType pixel_format = CVPixelBufferGetPixelFormatType(pixbuf);
> + uint32_t map_flags = 0;
>
> format = av_map_videotoolbox_format_to_pixfmt(pixel_format);
> if (dst->format != format) {
> --
> 2.31.1
>
More information about the ffmpeg-devel
mailing list