History

avfilter/avfilter: Move init_state to FilterLinkInternal

Andreas Rheinhardt committed 2 years ago

Commit 40b91ea1 parent 89eea4e3 files · +11 −10Browse files

Showing the changes to libavfilter (3 of 3 files). Show all

Unified · Split

3 files
  1. libavfilter/avfilter.c +4 −3
  2. libavfilter/avfilter.h +0 −7
  3. libavfilter/avfilter_internal.h +7 −0
libavfilter/avfilter.c+4−3
@@ -322,6 +322,7 @@ int avfilter_config_links(AVFilterContext *filter) · 321 unmodified lines
322322 for (i = 0; i < filter->nb_inputs; i ++) {
323323 AVFilterLink *link = filter->inputs[i];
324324 AVFilterLink *inlink;
325+ FilterLinkInternal *li = ff_link_internal(link);
325326
326327 if (!link) continue;
327328 if (!link->src || !link->dst) {
@@ -334,14 +335,14 @@ int avfilter_config_links(AVFilterContext *filter) · 6 unmodified lines
334335 link->current_pts =
335336 link->current_pts_us = AV_NOPTS_VALUE;
336337
337− switch (link->init_state) {
338+ switch (li->init_state) {
338339 case AVLINK_INIT:
339340 continue;
340341 case AVLINK_STARTINIT:
341342 av_log(filter, AV_LOG_INFO, "circular filter chain detected\n");
342343 return 0;
343344 case AVLINK_UNINIT:
344− link->init_state = AVLINK_STARTINIT;
345+ li->init_state = AVLINK_STARTINIT;
345346
346347 if ((ret = avfilter_config_links(link->src)) < 0)
347348 return ret;
@@ -412,7 +413,7 @@ int avfilter_config_links(AVFilterContext *filter) · 64 unmodified lines
412413 return ret;
413414 }
414415
415− link->init_state = AVLINK_INIT;
416+ li->init_state = AVLINK_INIT;
416417 }
417418 }
418419
libavfilter/avfilter.h+0−7
@@ -611,13 +611,6 @@ struct AVFilterLink { · 610 unmodified lines
611611 */
612612 AVFilterFormatsConfig outcfg;
613613
614− /** stage of the initialization of the link properties (dimensions, etc) */
615− enum {
616− AVLINK_UNINIT = 0, ///< not started
617− AVLINK_STARTINIT, ///< started, but incomplete
618− AVLINK_INIT ///< complete
619− } init_state;
620−
621614 /**
622615 * Graph the filter belongs to.
623616 */
libavfilter/avfilter_internal.h+7−0
@@ -63,6 +63,13 @@ typedef struct FilterLinkInternal { · 62 unmodified lines
6363 * corresponding code.
6464 */
6565 int status_out;
66+
67+ /** stage of the initialization of the link properties (dimensions, etc) */
68+ enum {
69+ AVLINK_UNINIT = 0, ///< not started
70+ AVLINK_STARTINIT, ///< started, but incomplete
71+ AVLINK_INIT ///< complete
72+ } init_state;
6673 } FilterLinkInternal;
6774
6875 static inline FilterLinkInternal *ff_link_internal(AVFilterLink *link)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t