mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
swscale: add sws_free_context()
Merely a convenience wrapper around sws_freeContext(). The name change is for parity with the other sws_* functions. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
parent
3bf12beae9
commit
87baf9ab2c
@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2024-10-23 - xxxxxxxxxx - lsws 8.7.100 - swscale.h
|
||||
Add sws_free_context().
|
||||
|
||||
2024-10-23 - xxxxxxxxxx - lavu 59.45.100 - pixfmt.h
|
||||
Add AV_PIX_FMT_Y216.
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Niklas Haas
|
||||
* Copyright (C) 2001-2011 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
@ -78,6 +79,12 @@ const AVClass *sws_get_class(void);
|
||||
*/
|
||||
SwsContext *sws_alloc_context(void);
|
||||
|
||||
/**
|
||||
* Free the context and everything associated with it, and write NULL
|
||||
* to the provided pointer.
|
||||
*/
|
||||
void sws_free_context(SwsContext **ctx);
|
||||
|
||||
/* values for the flags, the stuff on the command line is different */
|
||||
#define SWS_FAST_BILINEAR 1
|
||||
#define SWS_BILINEAR 2
|
||||
|
@ -2515,6 +2515,16 @@ void sws_freeContext(SwsContext *c)
|
||||
av_free(c);
|
||||
}
|
||||
|
||||
void sws_free_context(SwsContext **pctx)
|
||||
{
|
||||
SwsContext *ctx = *pctx;
|
||||
if (!ctx)
|
||||
return;
|
||||
|
||||
sws_freeContext(ctx);
|
||||
*pctx = NULL;
|
||||
}
|
||||
|
||||
SwsContext *sws_getCachedContext(SwsContext *context, int srcW,
|
||||
int srcH, enum AVPixelFormat srcFormat,
|
||||
int dstW, int dstH,
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWSCALE_VERSION_MINOR 6
|
||||
#define LIBSWSCALE_VERSION_MICRO 101
|
||||
#define LIBSWSCALE_VERSION_MINOR 7
|
||||
#define LIBSWSCALE_VERSION_MICRO 100
|
||||
|
||||
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
||||
LIBSWSCALE_VERSION_MINOR, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user