History

lavfi: regroup formats lists in a single structure.

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/*(.)

Nicolas George committed 6 years ago

Commit 2f764761 parent 6a2df7c70 files · +386 −364Browse files

Showing the changes to libavfilter/avfilter.c (1 of 70 files). Show all

Unified · Split

libavfilter/avfilter.c+15−15
@@ -261,15 +261,15 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 260 unmodified lines
261 261
262 /* if any information on supported media formats already exists on the262 /* if any information on supported media formats already exists on the
263 * link, we need to preserve that */263 * link, we need to preserve that */
264 if (link->out_formats)264 if (link->outcfg.formats)
265 ff_formats_changeref(&link->out_formats,265 ff_formats_changeref(&link->outcfg.formats,
266 &filt->outputs[filt_dstpad_idx]->out_formats);266 &filt->outputs[filt_dstpad_idx]->outcfg.formats);
267 if (link->out_samplerates)267 if (link->outcfg.samplerates)
268 ff_formats_changeref(&link->out_samplerates,268 ff_formats_changeref(&link->outcfg.samplerates,
269 &filt->outputs[filt_dstpad_idx]->out_samplerates);269 &filt->outputs[filt_dstpad_idx]->outcfg.samplerates);
270 if (link->out_channel_layouts)270 if (link->outcfg.channel_layouts)
271 ff_channel_layouts_changeref(&link->out_channel_layouts,271 ff_channel_layouts_changeref(&link->outcfg.channel_layouts,
272 &filt->outputs[filt_dstpad_idx]->out_channel_layouts);272 &filt->outputs[filt_dstpad_idx]->outcfg.channel_layouts);
273 273
274 return 0;274 return 0;
275}275}
@@ -746,12 +746,12 @@ static void free_link(AVFilterLink *link) · 470 unmodified lines
746 746
747 av_buffer_unref(&link->hw_frames_ctx);747 av_buffer_unref(&link->hw_frames_ctx);
748 748
749 ff_formats_unref(&link->in_formats);749 ff_formats_unref(&link->incfg.formats);
750 ff_formats_unref(&link->out_formats);750 ff_formats_unref(&link->outcfg.formats);
751 ff_formats_unref(&link->in_samplerates);751 ff_formats_unref(&link->incfg.samplerates);
752 ff_formats_unref(&link->out_samplerates);752 ff_formats_unref(&link->outcfg.samplerates);
753 ff_channel_layouts_unref(&link->in_channel_layouts);753 ff_channel_layouts_unref(&link->incfg.channel_layouts);
754 ff_channel_layouts_unref(&link->out_channel_layouts);754 ff_channel_layouts_unref(&link->outcfg.channel_layouts);
755 avfilter_link_free(&link);755 avfilter_link_free(&link);
756}756}
757 757

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