History

avfilter/avfiltergraph: Avoid allocation for AVFilterGraphInternal

To do this, allocate AVFilterGraphInternal jointly with AVFilterGraph and rename it to FFFilterGraph in the process (similarly to AVStream/FFStream). The AVFilterGraphInternal* will be removed on the next major version bump.

Andreas Rheinhardt committed 2 years ago

Commit 03567ed1 parent a1aec774 files · +43 −35Browse files

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

Unified · Split

libavfilter/avfilter.c+3−3
@@ -187,7 +187,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 186 unmodified lines
187187 av_assert0(AV_PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1);
188188 link->format = -1;
189189 link->colorspace = AVCOL_SPC_UNSPECIFIED;
190− ff_framequeue_init(&li->fifo, &src->graph->internal->frame_queues);
190+ ff_framequeue_init(&li->fifo, &fffiltergraph(src->graph)->frame_queues);
191191
192192 return 0;
193193 }
@@ -904,9 +904,9 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) · 710 unmodified lines
904904
905905 if (ctx->filter->flags & AVFILTER_FLAG_SLICE_THREADS &&
906906 ctx->thread_type & ctx->graph->thread_type & AVFILTER_THREAD_SLICE &&
907− ctx->graph->internal->thread_execute) {
907+ fffiltergraph(ctx->graph)->thread_execute) {
908908 ctx->thread_type = AVFILTER_THREAD_SLICE;
909− ctxi->execute = ctx->graph->internal->thread_execute;
909+ ctxi->execute = fffiltergraph(ctx->graph)->thread_execute;
910910 } else {
911911 ctx->thread_type = 0;
912912 }

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