It will allow to refernce it as a whole without clunky macros. Most of the changes have been automatically made with sed: sed -i ' s/-> *in_formats/->incfg.formats/g; s/-> *out_formats/->outcfg.formats/g; s/-> *in_channel_layouts/->incfg.channel_layouts/g; s/-> *out_channel_layouts/->outcfg.channel_layouts/g; s/-> *in_samplerates/->incfg.samplerates/g; s/-> *out_samplerates/->outcfg.samplerates/g; ' src/libavfilter/*(.)
Showing the changes to libavfilter/avfilter.c (1 of 70 files). Show all
Unified · Split
| @@ -261,15 +261,15 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 260 unmodified lines | ||
| 261 | 261 | |
| 262 | 262 | /* if any information on supported media formats already exists on the |
| 263 | 263 | * link, we need to preserve that */ |
| 264 | − if (link->out_formats) | |
| 265 | − ff_formats_changeref(&link->out_formats, | |
| 266 | − &filt->outputs[filt_dstpad_idx]->out_formats); | |
| 267 | − if (link->out_samplerates) | |
| 268 | − ff_formats_changeref(&link->out_samplerates, | |
| 269 | − &filt->outputs[filt_dstpad_idx]->out_samplerates); | |
| 270 | − if (link->out_channel_layouts) | |
| 271 | − ff_channel_layouts_changeref(&link->out_channel_layouts, | |
| 272 | − &filt->outputs[filt_dstpad_idx]->out_channel_layouts); | |
| 264 | + if (link->outcfg.formats) | |
| 265 | + ff_formats_changeref(&link->outcfg.formats, | |
| 266 | + &filt->outputs[filt_dstpad_idx]->outcfg.formats); | |
| 267 | + if (link->outcfg.samplerates) | |
| 268 | + ff_formats_changeref(&link->outcfg.samplerates, | |
| 269 | + &filt->outputs[filt_dstpad_idx]->outcfg.samplerates); | |
| 270 | + if (link->outcfg.channel_layouts) | |
| 271 | + ff_channel_layouts_changeref(&link->outcfg.channel_layouts, | |
| 272 | + &filt->outputs[filt_dstpad_idx]->outcfg.channel_layouts); | |
| 273 | 273 | |
| 274 | 274 | return 0; |
| 275 | 275 | } |
| @@ -746,12 +746,12 @@ static void free_link(AVFilterLink *link) · 470 unmodified lines | ||
| 746 | 746 | |
| 747 | 747 | av_buffer_unref(&link->hw_frames_ctx); |
| 748 | 748 | |
| 749 | − ff_formats_unref(&link->in_formats); | |
| 750 | − ff_formats_unref(&link->out_formats); | |
| 751 | − ff_formats_unref(&link->in_samplerates); | |
| 752 | − ff_formats_unref(&link->out_samplerates); | |
| 753 | − ff_channel_layouts_unref(&link->in_channel_layouts); | |
| 754 | − ff_channel_layouts_unref(&link->out_channel_layouts); | |
| 749 | + ff_formats_unref(&link->incfg.formats); | |
| 750 | + ff_formats_unref(&link->outcfg.formats); | |
| 751 | + ff_formats_unref(&link->incfg.samplerates); | |
| 752 | + ff_formats_unref(&link->outcfg.samplerates); | |
| 753 | + ff_channel_layouts_unref(&link->incfg.channel_layouts); | |
| 754 | + ff_channel_layouts_unref(&link->outcfg.channel_layouts); | |
| 755 | 755 | avfilter_link_free(&link); |
| 756 | 756 | } |
| 757 | 757 | |