It never makes sense for this function to be called by users.
Unified · Split
| @@ -192,7 +192,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 191 unmodified lines | |||
| 192 | return 0; | 192 | return 0; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void avfilter_link_free(AVFilterLink **link) | 195 | static void link_free(AVFilterLink **link) |
| 196 | { | 196 | { |
| 197 | FilterLinkInternal *li; | 197 | FilterLinkInternal *li; |
| 198 | 198 | ||
| @@ -207,6 +207,13 @@ void avfilter_link_free(AVFilterLink **link) · 8 unmodified lines | |||
| 207 | av_freep(link); | 207 | av_freep(link); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | #if FF_API_LINK_PUBLIC | ||
| 211 | void avfilter_link_free(AVFilterLink **link) | ||
| 212 | { | ||
| 213 | link_free(link); | ||
| 214 | } | ||
| 215 | #endif | ||
| 216 | |||
| 210 | static void update_link_current_pts(FilterLinkInternal *li, int64_t pts) | 217 | static void update_link_current_pts(FilterLinkInternal *li, int64_t pts) |
| 211 | { | 218 | { |
| 212 | AVFilterLink *const link = &li->l; | 219 | AVFilterLink *const link = &li->l; |
| @@ -763,7 +770,7 @@ static void free_link(AVFilterLink *link) · 550 unmodified lines | |||
| 763 | ff_formats_unref(&link->outcfg.samplerates); | 770 | ff_formats_unref(&link->outcfg.samplerates); |
| 764 | ff_channel_layouts_unref(&link->incfg.channel_layouts); | 771 | ff_channel_layouts_unref(&link->incfg.channel_layouts); |
| 765 | ff_channel_layouts_unref(&link->outcfg.channel_layouts); | 772 | ff_channel_layouts_unref(&link->outcfg.channel_layouts); |
| 766 | avfilter_link_free(&link); | 773 | link_free(&link); |
| 767 | } | 774 | } |
| 768 | 775 | ||
| 769 | void avfilter_free(AVFilterContext *filter) | 776 | void avfilter_free(AVFilterContext *filter) |
| @@ -676,10 +676,13 @@ struct AVFilterLink { · 675 unmodified lines | |||
| 676 | int avfilter_link(AVFilterContext *src, unsigned srcpad, | 676 | int avfilter_link(AVFilterContext *src, unsigned srcpad, |
| 677 | AVFilterContext *dst, unsigned dstpad); | 677 | AVFilterContext *dst, unsigned dstpad); |
| 678 | 678 | ||
| 679 | #if FF_API_LINK_PUBLIC | ||
| 679 | /** | 680 | /** |
| 680 | * Free the link in *link, and set its pointer to NULL. | 681 | * @deprecated this function should never be called by users |
| 681 | */ | 682 | */ |
| 683 | attribute_deprecated | ||
| 682 | void avfilter_link_free(AVFilterLink **link); | 684 | void avfilter_link_free(AVFilterLink **link); |
| 685 | #endif | ||
| 683 | 686 | ||
| 684 | /** | 687 | /** |
| 685 | * Negotiate the media format, dimensions, etc of all inputs to a filter. | 688 | * Negotiate the media format, dimensions, etc of all inputs to a filter. |
| @@ -35,4 +35,6 @@ · 34 unmodified lines | |||
| 35 | * the public API and may change, break or disappear at any time. | 35 | * the public API and may change, break or disappear at any time. |
| 36 | */ | 36 | */ |
| 37 | 37 | ||
| 38 | #define FF_API_LINK_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 11) | ||
| 39 | |||
| 38 | #endif /* AVFILTER_VERSION_MAJOR_H */ | 40 | #endif /* AVFILTER_VERSION_MAJOR_H */ |