mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-29 21:47:48 +02:00
avfilter/avfilter: Move init_state to FilterLinkInternal
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
89eea4e19a
commit
40b91eaea9
@ -322,6 +322,7 @@ int avfilter_config_links(AVFilterContext *filter)
|
|||||||
for (i = 0; i < filter->nb_inputs; i ++) {
|
for (i = 0; i < filter->nb_inputs; i ++) {
|
||||||
AVFilterLink *link = filter->inputs[i];
|
AVFilterLink *link = filter->inputs[i];
|
||||||
AVFilterLink *inlink;
|
AVFilterLink *inlink;
|
||||||
|
FilterLinkInternal *li = ff_link_internal(link);
|
||||||
|
|
||||||
if (!link) continue;
|
if (!link) continue;
|
||||||
if (!link->src || !link->dst) {
|
if (!link->src || !link->dst) {
|
||||||
@ -334,14 +335,14 @@ int avfilter_config_links(AVFilterContext *filter)
|
|||||||
link->current_pts =
|
link->current_pts =
|
||||||
link->current_pts_us = AV_NOPTS_VALUE;
|
link->current_pts_us = AV_NOPTS_VALUE;
|
||||||
|
|
||||||
switch (link->init_state) {
|
switch (li->init_state) {
|
||||||
case AVLINK_INIT:
|
case AVLINK_INIT:
|
||||||
continue;
|
continue;
|
||||||
case AVLINK_STARTINIT:
|
case AVLINK_STARTINIT:
|
||||||
av_log(filter, AV_LOG_INFO, "circular filter chain detected\n");
|
av_log(filter, AV_LOG_INFO, "circular filter chain detected\n");
|
||||||
return 0;
|
return 0;
|
||||||
case AVLINK_UNINIT:
|
case AVLINK_UNINIT:
|
||||||
link->init_state = AVLINK_STARTINIT;
|
li->init_state = AVLINK_STARTINIT;
|
||||||
|
|
||||||
if ((ret = avfilter_config_links(link->src)) < 0)
|
if ((ret = avfilter_config_links(link->src)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
@ -412,7 +413,7 @@ int avfilter_config_links(AVFilterContext *filter)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
link->init_state = AVLINK_INIT;
|
li->init_state = AVLINK_INIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,13 +611,6 @@ struct AVFilterLink {
|
|||||||
*/
|
*/
|
||||||
AVFilterFormatsConfig outcfg;
|
AVFilterFormatsConfig outcfg;
|
||||||
|
|
||||||
/** stage of the initialization of the link properties (dimensions, etc) */
|
|
||||||
enum {
|
|
||||||
AVLINK_UNINIT = 0, ///< not started
|
|
||||||
AVLINK_STARTINIT, ///< started, but incomplete
|
|
||||||
AVLINK_INIT ///< complete
|
|
||||||
} init_state;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Graph the filter belongs to.
|
* Graph the filter belongs to.
|
||||||
*/
|
*/
|
||||||
|
@ -63,6 +63,13 @@ typedef struct FilterLinkInternal {
|
|||||||
* corresponding code.
|
* corresponding code.
|
||||||
*/
|
*/
|
||||||
int status_out;
|
int status_out;
|
||||||
|
|
||||||
|
/** stage of the initialization of the link properties (dimensions, etc) */
|
||||||
|
enum {
|
||||||
|
AVLINK_UNINIT = 0, ///< not started
|
||||||
|
AVLINK_STARTINIT, ///< started, but incomplete
|
||||||
|
AVLINK_INIT ///< complete
|
||||||
|
} init_state;
|
||||||
} FilterLinkInternal;
|
} FilterLinkInternal;
|
||||||
|
|
||||||
static inline FilterLinkInternal *ff_link_internal(AVFilterLink *link)
|
static inline FilterLinkInternal *ff_link_internal(AVFilterLink *link)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user