Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fd682b18
Commit
fd682b18
authored
Mar 15, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: handle error in query_formats() of a bunch of random video filters
parent
545b0dd6
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
118 additions
and
83 deletions
+118
-83
f_select.c
libavfilter/f_select.c
+8
-1
vf_codecview.c
libavfilter/vf_codecview.c
+4
-2
vf_colorbalance.c
libavfilter/vf_colorbalance.c
+4
-3
vf_colormatrix.c
libavfilter/vf_colormatrix.c
+4
-4
vf_curves.c
libavfilter/vf_curves.c
+4
-2
vf_dctdnoiz.c
libavfilter/vf_dctdnoiz.c
+4
-2
vf_decimate.c
libavfilter/vf_decimate.c
+4
-2
vf_delogo.c
libavfilter/vf_delogo.c
+4
-3
vf_deshake.c
libavfilter/vf_deshake.c
+4
-4
vf_drawbox.c
libavfilter/vf_drawbox.c
+4
-3
vf_edgedetect.c
libavfilter/vf_edgedetect.c
+10
-5
vf_elbg.c
libavfilter/vf_elbg.c
+4
-4
vf_eq.c
libavfilter/vf_eq.c
+4
-4
vf_fieldmatch.c
libavfilter/vf_fieldmatch.c
+4
-2
vf_gradfun.c
libavfilter/vf_gradfun.c
+4
-4
vf_histeq.c
libavfilter/vf_histeq.c
+4
-3
vf_hqdn3d.c
libavfilter/vf_hqdn3d.c
+4
-4
vf_hqx.c
libavfilter/vf_hqx.c
+4
-2
vf_hue.c
libavfilter/vf_hue.c
+4
-4
vf_idet.c
libavfilter/vf_idet.c
+4
-4
vf_lenscorrection.c
libavfilter/vf_lenscorrection.c
+4
-3
vf_libopencv.c
libavfilter/vf_libopencv.c
+4
-3
vf_lut.c
libavfilter/vf_lut.c
+4
-3
vf_lut3d.c
libavfilter/vf_lut3d.c
+4
-2
vf_mcdeint.c
libavfilter/vf_mcdeint.c
+4
-4
vf_mpdecimate.c
libavfilter/vf_mpdecimate.c
+4
-4
vf_owdenoise.c
libavfilter/vf_owdenoise.c
+4
-2
No files found.
libavfilter/f_select.c
View file @
fd682b18
...
...
@@ -416,11 +416,18 @@ static int query_formats(AVFilterContext *ctx)
if
(
!
select
->
do_scene_detect
)
{
return
ff_default_query_formats
(
ctx
);
}
else
{
int
ret
;
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
ret
=
ff_set_common_formats
(
ctx
,
fmts_list
);
if
(
ret
<
0
)
return
ret
;
}
return
0
;
}
...
...
libavfilter/vf_codecview.c
View file @
fd682b18
...
...
@@ -62,8 +62,10 @@ static int query_formats(AVFilterContext *ctx)
// TODO: we can probably add way more pixel formats without any other
// changes; anything with 8-bit luma in first plane should be working
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
clip_line
(
int
*
sx
,
int
*
sy
,
int
*
ex
,
int
*
ey
,
int
maxx
)
...
...
libavfilter/vf_colorbalance.c
View file @
fd682b18
...
...
@@ -76,9 +76,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_RGB0
,
AV_PIX_FMT_BGR0
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_output
(
AVFilterLink
*
outlink
)
...
...
libavfilter/vf_colormatrix.c
View file @
fd682b18
...
...
@@ -353,10 +353,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_UYVY422
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFrame
*
in
)
...
...
libavfilter/vf_curves.c
View file @
fd682b18
...
...
@@ -464,8 +464,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_RGB0
,
AV_PIX_FMT_BGR0
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_dctdnoiz.c
View file @
fd682b18
...
...
@@ -600,8 +600,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
typedef
struct
ThreadData
{
...
...
libavfilter/vf_decimate.c
View file @
fd682b18
...
...
@@ -350,8 +350,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GRAY16
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_output
(
AVFilterLink
*
outlink
)
...
...
libavfilter/vf_delogo.c
View file @
fd682b18
...
...
@@ -177,9 +177,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
...
...
libavfilter/vf_deshake.c
View file @
fd682b18
...
...
@@ -396,10 +396,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV411P
,
AV_PIX_FMT_YUV440P
,
AV_PIX_FMT_YUVJ420P
,
AV_PIX_FMT_YUVJ422P
,
AV_PIX_FMT_YUVJ444P
,
AV_PIX_FMT_YUVJ440P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
config_props
(
AVFilterLink
*
link
)
...
...
libavfilter/vf_drawbox.c
View file @
fd682b18
...
...
@@ -112,9 +112,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV440P
,
AV_PIX_FMT_YUVJ440P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_edgedetect.c
View file @
fd682b18
...
...
@@ -78,17 +78,22 @@ static av_cold int init(AVFilterContext *ctx)
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
const
EdgeDetectContext
*
edgedetect
=
ctx
->
priv
;
static
const
enum
AVPixelFormat
wires_pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
static
const
enum
AVPixelFormat
colormix_pix_fmts
[]
=
{
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
AVFilterFormats
*
fmts_list
;
const
enum
AVPixelFormat
*
pix_fmts
=
NULL
;
if
(
edgedetect
->
mode
==
MODE_WIRES
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
pix_fmts
=
wires_pix_fmts
;
}
else
if
(
edgedetect
->
mode
==
MODE_COLORMIX
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
pix_fmts
=
colormix_pix_fmts
;
}
else
{
av_assert0
(
0
);
}
return
0
;
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_props
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_elbg.c
View file @
fd682b18
...
...
@@ -80,10 +80,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
#define NB_COMPONENTS 3
...
...
libavfilter/vf_eq.c
View file @
fd682b18
...
...
@@ -233,10 +233,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pixel_fmts_eq
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pixel_fmts_eq
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
in
)
...
...
libavfilter/vf_fieldmatch.c
View file @
fd682b18
...
...
@@ -855,8 +855,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV411P
,
AV_PIX_FMT_YUV410P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_gradfun.c
View file @
fd682b18
...
...
@@ -155,10 +155,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_histeq.c
View file @
fd682b18
...
...
@@ -99,9 +99,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_hqdn3d.c
View file @
fd682b18
...
...
@@ -253,10 +253,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV444P16
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_hqx.c
View file @
fd682b18
...
...
@@ -462,8 +462,10 @@ HQX_FUNC(4)
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_RGB32
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_output
(
AVFilterLink
*
outlink
)
...
...
libavfilter/vf_hue.c
View file @
fd682b18
...
...
@@ -233,10 +233,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
config_props
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_idet.c
View file @
fd682b18
...
...
@@ -399,10 +399,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
config_output
(
AVFilterLink
*
outlink
)
...
...
libavfilter/vf_lenscorrection.c
View file @
fd682b18
...
...
@@ -107,9 +107,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_GBRAP
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
...
...
libavfilter/vf_libopencv.c
View file @
fd682b18
...
...
@@ -63,9 +63,10 @@ static int query_formats(AVFilterContext *ctx)
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_BGR24
,
AV_PIX_FMT_BGRA
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
typedef
struct
OCVContext
{
...
...
libavfilter/vf_lut.c
View file @
fd682b18
...
...
@@ -130,9 +130,10 @@ static int query_formats(AVFilterContext *ctx)
const
enum
AVPixelFormat
*
pix_fmts
=
s
->
is_rgb
?
rgb_pix_fmts
:
s
->
is_yuv
?
yuv_pix_fmts
:
all_pix_fmts
;
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
/**
...
...
libavfilter/vf_lut3d.c
View file @
fd682b18
...
...
@@ -471,8 +471,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_RGBA64
,
AV_PIX_FMT_BGRA64
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_mcdeint.c
View file @
fd682b18
...
...
@@ -163,10 +163,10 @@ static int query_formats(AVFilterContext *ctx)
static
const
enum
PixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
inpic
)
...
...
libavfilter/vf_mpdecimate.c
View file @
fd682b18
...
...
@@ -158,10 +158,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
)
;
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
libavfilter/vf_owdenoise.c
View file @
fd682b18
...
...
@@ -267,8 +267,10 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P
,
AV_PIX_FMT_NONE
};
ff_set_common_formats
(
ctx
,
ff_make_format_list
(
pix_fmts
));
return
0
;
AVFilterFormats
*
fmts_list
=
ff_make_format_list
(
pix_fmts
);
if
(
!
fmts_list
)
return
AVERROR
(
ENOMEM
);
return
ff_set_common_formats
(
ctx
,
fmts_list
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment