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
174c483e
Commit
174c483e
authored
Dec 20, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/select: fix compilation with avcodec disabled.
parent
974ac57e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
f_select.c
libavfilter/f_select.c
+8
-2
No files found.
libavfilter/f_select.c
View file @
174c483e
...
...
@@ -206,12 +206,14 @@ static int config_input(AVFilterLink *inlink)
select
->
var_values
[
VAR_SAMPLE_RATE
]
=
inlink
->
type
==
AVMEDIA_TYPE_AUDIO
?
inlink
->
sample_rate
:
NAN
;
if
(
CONFIG_AVCODEC
&&
select
->
do_scene_detect
)
{
#if CONFIG_AVCODEC
if
(
select
->
do_scene_detect
)
{
select
->
avctx
=
avcodec_alloc_context3
(
NULL
);
if
(
!
select
->
avctx
)
return
AVERROR
(
ENOMEM
);
dsputil_init
(
&
select
->
c
,
select
->
avctx
);
}
#endif
return
0
;
}
...
...
@@ -283,13 +285,15 @@ static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *ref)
!
ref
->
video
->
interlaced
?
INTERLACE_TYPE_P
:
ref
->
video
->
top_field_first
?
INTERLACE_TYPE_T
:
INTERLACE_TYPE_B
;
select
->
var_values
[
VAR_PICT_TYPE
]
=
ref
->
video
->
pict_type
;
if
(
CONFIG_AVCODEC
&&
select
->
do_scene_detect
)
{
#if CONFIG_AVCODEC
if
(
select
->
do_scene_detect
)
{
char
buf
[
32
];
select
->
var_values
[
VAR_SCENE
]
=
get_scene_score
(
ctx
,
ref
);
// TODO: document metadata
snprintf
(
buf
,
sizeof
(
buf
),
"%f"
,
select
->
var_values
[
VAR_SCENE
]);
av_dict_set
(
&
ref
->
metadata
,
"lavfi.scene_score"
,
buf
,
0
);
}
#endif
break
;
}
...
...
@@ -370,6 +374,7 @@ static av_cold void uninit(AVFilterContext *ctx)
select
->
expr
=
NULL
;
av_opt_free
(
select
);
#if CONFIG_AVCODEC
if
(
select
->
do_scene_detect
)
{
avfilter_unref_bufferp
(
&
select
->
prev_picref
);
if
(
select
->
avctx
)
{
...
...
@@ -377,6 +382,7 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep
(
&
select
->
avctx
);
}
}
#endif
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
...
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