mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 04:52:09 +00:00
vf_format: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
This commit is contained in:
parent
d64cf54b34
commit
cbec213a90
@ -49,14 +49,14 @@ typedef struct {
|
|||||||
|
|
||||||
static av_cold int init(AVFilterContext *ctx)
|
static av_cold int init(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
FormatContext *format = ctx->priv;
|
FormatContext *s = ctx->priv;
|
||||||
const char *cur, *sep;
|
const char *cur, *sep;
|
||||||
char pix_fmt_name[AV_PIX_FMT_NAME_MAXSIZE];
|
char pix_fmt_name[AV_PIX_FMT_NAME_MAXSIZE];
|
||||||
int pix_fmt_name_len;
|
int pix_fmt_name_len;
|
||||||
enum AVPixelFormat pix_fmt;
|
enum AVPixelFormat pix_fmt;
|
||||||
|
|
||||||
/* parse the list of formats */
|
/* parse the list of formats */
|
||||||
for (cur = format->pix_fmts; cur; cur = sep ? sep + 1 : NULL) {
|
for (cur = s->pix_fmts; cur; cur = sep ? sep + 1 : NULL) {
|
||||||
if (!(sep = strchr(cur, '|')))
|
if (!(sep = strchr(cur, '|')))
|
||||||
pix_fmt_name_len = strlen(cur);
|
pix_fmt_name_len = strlen(cur);
|
||||||
else
|
else
|
||||||
@ -75,13 +75,13 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
format->listed_pix_fmt_flags[pix_fmt] = 1;
|
s->listed_pix_fmt_flags[pix_fmt] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static AVFilterFormats *make_format_list(FormatContext *format, int flag)
|
static AVFilterFormats *make_format_list(FormatContext *s, int flag)
|
||||||
{
|
{
|
||||||
AVFilterFormats *formats;
|
AVFilterFormats *formats;
|
||||||
enum AVPixelFormat pix_fmt;
|
enum AVPixelFormat pix_fmt;
|
||||||
@ -90,7 +90,7 @@ static AVFilterFormats *make_format_list(FormatContext *format, int flag)
|
|||||||
formats->formats = av_malloc(sizeof(enum AVPixelFormat) * AV_PIX_FMT_NB);
|
formats->formats = av_malloc(sizeof(enum AVPixelFormat) * AV_PIX_FMT_NB);
|
||||||
|
|
||||||
for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
|
for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
|
||||||
if (format->listed_pix_fmt_flags[pix_fmt] == flag)
|
if (s->listed_pix_fmt_flags[pix_fmt] == flag)
|
||||||
formats->formats[formats->format_count++] = pix_fmt;
|
formats->formats[formats->format_count++] = pix_fmt;
|
||||||
|
|
||||||
return formats;
|
return formats;
|
||||||
|
Loading…
Reference in New Issue
Block a user