History

avfilter/ccfifo: remove unnecessary context allocations

This is not public API, no it has no need for an alloc() and free() functions. The struct can reside on stack.

James Almer committed 3 years ago

Commit 7f890b21 parent 86ee03113 files · +89 −94Browse files

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

Unified · Split

11 files
  1. libavfilter/ccfifo.c +15 −34
  2. libavfilter/ccfifo.h +25 −17
  3. libavfilter/tinterlace.h +1 −1
  4. libavfilter/vf_bwdif.c +5 −3
  5. libavfilter/vf_ccrepack.c +7 −6
  6. libavfilter/vf_fps.c +7 −6
  7. libavfilter/vf_tinterlace.c +9 −9
  8. libavfilter/vf_yadif.c +5 −3
  9. libavfilter/vf_yadif_cuda.c +3 −3
  10. libavfilter/yadif.h +1 −1
  11. libavfilter/yadif_common.c +3 −3
libavfilter/ccfifo.c+15−34
@@ -23,18 +23,6 @@ · 22 unmodified lines
2323
2424 #include "ccfifo.h"
2525
26−struct AVCCFifo {
27− AVFifo *cc_608_fifo;
28− AVFifo *cc_708_fifo;
29− AVRational framerate;
30− int expected_cc_count;
31− int expected_608;
32− int cc_detected;
33− int passthrough;
34− int passthrough_warning;
35− void *log_ctx;
36−};
37−
3826 #define MAX_CC_ELEMENTS 128
3927 #define CC_BYTES_PER_ENTRY 3
4028
@@ -55,25 +43,18 @@ const static struct cc_lookup cc_lookup_vals[] = { · 14 unmodified lines
5543 { 60000, 1001, 10, 1},
5644 };
5745
58−void ff_ccfifo_freep(AVCCFifo **ccf)
46+void ff_ccfifo_uninit(CCFifo *ccf)
5947 {
60− AVCCFifo *tmp = *ccf;
61− if (tmp) {
62− av_fifo_freep2(&tmp->cc_608_fifo);
63− av_fifo_freep2(&tmp->cc_708_fifo);
64− }
65− av_freep(ccf);
48+ av_fifo_freep2(&ccf->cc_608_fifo);
49+ av_fifo_freep2(&ccf->cc_708_fifo);
50+ memset(ccf, 0, sizeof(*ccf));
6651 }
6752
68−AVCCFifo *ff_ccfifo_alloc(AVRational framerate, void *log_ctx)
53+int ff_ccfifo_init(CCFifo *ccf, AVRational framerate, void *log_ctx)
6954 {
70− AVCCFifo *ccf;
7155 int i;
7256
73− ccf = av_mallocz(sizeof(*ccf));
74− if (!ccf)
75− return NULL;
76−
57+ memset(ccf, 0, sizeof(*ccf));
7758 ccf->log_ctx = log_ctx;
7859 ccf->framerate = framerate;
7960
@@ -101,24 +82,24 @@ AVCCFifo *ff_ccfifo_alloc(AVRational framerate, void *log_ctx) · 21 unmodified lines
10182 ccf->passthrough = 1;
10283 }
10384
104− return ccf;
85+ return 0;
10586
10687 error:
107− ff_ccfifo_freep(&ccf);
108− return NULL;
88+ ff_ccfifo_uninit(ccf);
89+ return AVERROR(ENOMEM);
10990 }
11091
111−int ff_ccfifo_getoutputsize(AVCCFifo *ccf)
92+int ff_ccfifo_getoutputsize(CCFifo *ccf)
11293 {
11394 return ccf->expected_cc_count * CC_BYTES_PER_ENTRY;
11495 }
11596
116−int ff_ccfifo_ccdetected(AVCCFifo *ccf)
97+int ff_ccfifo_ccdetected(CCFifo *ccf)
11798 {
11899 return ccf->cc_detected;
119100 }
120101
121−int ff_ccfifo_injectbytes(AVCCFifo *ccf, uint8_t *cc_data, size_t len)
102+int ff_ccfifo_injectbytes(CCFifo *ccf, uint8_t *cc_data, size_t len)
122103 {
123104 int cc_608_tuples = 0;
124105 int cc_708_tuples = 0;
@@ -159,7 +140,7 @@ int ff_ccfifo_injectbytes(AVCCFifo *ccf, uint8_t *cc_data, size_t len) · 34 unmodified lines
159140 return 0;
160141 }
161142
162−int ff_ccfifo_inject(AVCCFifo *ccf, AVFrame *frame)
143+int ff_ccfifo_inject(CCFifo *ccf, AVFrame *frame)
163144 {
164145 AVFrameSideData *sd;
165146 int ret;
@@ -180,7 +161,7 @@ int ff_ccfifo_inject(AVCCFifo *ccf, AVFrame *frame) · 14 unmodified lines
180161 return 0;
181162 }
182163
183−int ff_ccfifo_extractbytes(AVCCFifo *ccf, uint8_t *cc_bytes, size_t len)
164+int ff_ccfifo_extractbytes(CCFifo *ccf, uint8_t *cc_bytes, size_t len)
184165 {
185166 int cc_count = len / CC_BYTES_PER_ENTRY;
186167
@@ -209,7 +190,7 @@ int ff_ccfifo_extractbytes(AVCCFifo *ccf, uint8_t *cc_bytes, size_t len) · 22 unmodified lines
209190 /* Read the A53 side data, discard padding, and put 608/708 into
210191 queues so we can ensure they get into the output frames at
211192 the correct rate... */
212−int ff_ccfifo_extract(AVCCFifo *ccf, AVFrame *frame)
193+int ff_ccfifo_extract(CCFifo *ccf, AVFrame *frame)
213194 {
214195 AVFrameSideData *side_data = av_frame_get_side_data(frame, AV_FRAME_DATA_A53_CC);
215196 if (side_data) {
libavfilter/ccfifo.h+25−17
@@ -33,25 +33,33 @@ · 32 unmodified lines
3333 #include "libavutil/frame.h"
3434 #include "libavutil/fifo.h"
3535
36−typedef struct AVCCFifo AVCCFifo;
36+typedef struct CCFifo {
37+ AVFifo *cc_608_fifo;
38+ AVFifo *cc_708_fifo;
39+ AVRational framerate;
40+ int expected_cc_count;
41+ int expected_608;
42+ int cc_detected;
43+ int passthrough;
44+ int passthrough_warning;
45+ void *log_ctx;
46+} CCFifo;
3747
3848 /**
39− * Allocate an AVCCFifo.
49+ * Initialize a CCFifo.
4050 *
4151 * @param framerate output framerate
4252 * @param log_ctx used for any av_log() calls
43− * @return newly allocated AVCCFifo, or NULL on error
53+ * @return Zero on success, or negative AVERROR code on failure.
4454 */
45−AVCCFifo *ff_ccfifo_alloc(AVRational framerate, void *log_ctx);
55+int ff_ccfifo_init(CCFifo *ccf, AVRational framerate, void *log_ctx);
4656
4757 /**
48− * Free an AVCCFifo
58+ * Free all memory allocated in a CCFifo and clear the context.
4959 *
50− * @param ccf Pointer to the pointer to the AVCCFifo which should be freed
51− * @note `*ptr = NULL` is safe and leads to no action.
60+ * @param ccf Pointer to the CCFifo which should be uninitialized
5261 */
53−void ff_ccfifo_freep(AVCCFifo **ccf);
54−
62+void ff_ccfifo_uninit(CCFifo *ccf);
5563
5664 /**
5765 * Extract CC data from an AVFrame
@@ -61,17 +69,17 @@ void ff_ccfifo_freep(AVCCFifo **ccf); · 3 unmodified lines
6169 * as it will be re-inserted at the appropriate rate later in the
6270 * filter.
6371 *
64− * @param af AVCCFifo to write to
72+ * @param af CCFifo to write to
6573 * @param frame AVFrame with the video frame to operate on
6674 * @return Zero on success, or negative AVERROR
6775 * code on failure.
6876 */
69−int ff_ccfifo_extract(AVCCFifo *ccf, AVFrame *frame);
77+int ff_ccfifo_extract(CCFifo *ccf, AVFrame *frame);
7078
7179 /**
7280 *Just like ff_ccfifo_extract(), but takes the raw bytes instead of an AVFrame
7381 */
74−int ff_ccfifo_extractbytes(AVCCFifo *ccf, uint8_t *data, size_t len);
82+int ff_ccfifo_extractbytes(CCFifo *ccf, uint8_t *data, size_t len);
7583
7684 /**
7785 * Provide the size in bytes of an output buffer to allocate
@@ -80,7 +88,7 @@ int ff_ccfifo_extractbytes(AVCCFifo *ccf, uint8_t *data, size_t len); · 2 unmodified lines
8088 * an appropriately sized buffer and pass it to ff_ccfifo_injectbytes()
8189 *
8290 */
83−int ff_ccfifo_getoutputsize(AVCCFifo *ccf);
91+int ff_ccfifo_getoutputsize(CCFifo *ccf);
8492
8593 /**
8694 * Insert CC data from the FIFO into an AVFrame (as side data)
@@ -88,23 +96,23 @@ int ff_ccfifo_getoutputsize(AVCCFifo *ccf); · 1 unmodified line
8896 * Dequeue the appropriate number of CC tuples based on the
8997 * frame rate, and insert them into the AVFrame
9098 *
91− * @param af AVCCFifo to read from
99+ * @param af CCFifo to read from
92100 * @param frame AVFrame with the video frame to operate on
93101 * @return Zero on success, or negative AVERROR
94102 * code on failure.
95103 */
96−int ff_ccfifo_inject(AVCCFifo *ccf, AVFrame *frame);
104+int ff_ccfifo_inject(CCFifo *ccf, AVFrame *frame);
97105
98106 /**
99107 * Just like ff_ccfifo_inject(), but takes the raw bytes to insert the CC data
100108 * int rather than an AVFrame
101109 */
102−int ff_ccfifo_injectbytes(AVCCFifo *ccf, uint8_t *data, size_t len);
110+int ff_ccfifo_injectbytes(CCFifo *ccf, uint8_t *data, size_t len);
103111
104112 /**
105113 * Returns 1 if captions have been found as a prior call
106114 * to ff_ccfifo_extract() or ff_ccfifo_extractbytes()
107115 */
108−int ff_ccfifo_ccdetected(AVCCFifo *ccf);
116+int ff_ccfifo_ccdetected(CCFifo *ccf);
109117
110118 #endif /* AVFILTER_CCFIFO_H */
libavfilter/tinterlace.h+1−1
@@ -78,7 +78,7 @@ typedef struct TInterlaceContext { · 77 unmodified lines
7878 const AVPixFmtDescriptor *csp;
7979 void (*lowpass_line)(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
8080 ptrdiff_t mref, ptrdiff_t pref, int clip_max);
81− AVCCFifo *cc_fifo;
81+ CCFifo cc_fifo;
8282 } TInterlaceContext;
8383
8484 void ff_tinterlace_init_x86(TInterlaceContext *interlace);
libavfilter/vf_bwdif.c+5−3
@@ -297,7 +297,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 296 unmodified lines
297297 av_frame_free(&yadif->prev);
298298 av_frame_free(&yadif->cur );
299299 av_frame_free(&yadif->next);
300− ff_ccfifo_freep(&yadif->cc_fifo);
300+ ff_ccfifo_uninit(&yadif->cc_fifo);
301301 }
302302
303303 static const enum AVPixelFormat pix_fmts[] = {
@@ -326,6 +326,7 @@ static int config_props(AVFilterLink *link) · 22 unmodified lines
326326 AVFilterContext *ctx = link->src;
327327 BWDIFContext *s = link->src->priv;
328328 YADIFContext *yadif = &s->yadif;
329+ int ret;
329330
330331 link->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2});
331332 link->w = link->src->inputs[0]->w;
@@ -336,9 +337,10 @@ static int config_props(AVFilterLink *link) · 4 unmodified lines
336337 else
337338 link->frame_rate = ctx->inputs[0]->frame_rate;
338339
339− if (!(yadif->cc_fifo = ff_ccfifo_alloc(link->frame_rate, ctx))) {
340+ ret = ff_ccfifo_init(&yadif->cc_fifo, link->frame_rate, ctx);
341+ if (ret < 0 ) {
340342 av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n");
341− return AVERROR(ENOMEM);
343+ return ret;
342344 }
343345
344346 if (link->w < 3 || link->h < 4) {
libavfilter/vf_ccrepack.c+7−6
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 typedef struct CCRepackContext
3838 {
3939 const AVClass *class;
40− AVCCFifo *cc_fifo;
40+ CCFifo cc_fifo;
4141 } CCRepackContext;
4242
4343 static const AVOption ccrepack_options[] = {
@@ -50,9 +50,10 @@ static int config_input(AVFilterLink *link) · 6 unmodified lines
5050 {
5151 CCRepackContext *ctx = link->dst->priv;
5252
53− if (!(ctx->cc_fifo = ff_ccfifo_alloc(link->frame_rate, ctx))) {
53+ int ret = ff_ccfifo_init(&ctx->cc_fifo, link->frame_rate, ctx);
54+ if (ret < 0) {
5455 av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n");
55− return AVERROR(ENOMEM);
56+ return ret;
5657 }
5758
5859 return 0;
@@ -63,8 +64,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 4 unmodified lines
6364 CCRepackContext *ctx = inlink->dst->priv;
6465 AVFilterLink *outlink = inlink->dst->outputs[0];
6566
66− ff_ccfifo_extract(ctx->cc_fifo, frame);
67− ff_ccfifo_inject(ctx->cc_fifo, frame);
67+ ff_ccfifo_extract(&ctx->cc_fifo, frame);
68+ ff_ccfifo_inject(&ctx->cc_fifo, frame);
6869
6970 return ff_filter_frame(outlink, frame);
7071 }
@@ -72,7 +73,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 1 unmodified line
7273 static av_cold void uninit(AVFilterContext *ctx)
7374 {
7475 CCRepackContext *s = ctx->priv;
75− ff_ccfifo_freep(&s->cc_fifo);
76+ ff_ccfifo_uninit(&s->cc_fifo);
7677 }
7778
7879 static const AVFilterPad avfilter_vf_ccrepack_inputs[] = {
libavfilter/vf_fps.c+7−6
@@ -86,7 +86,7 @@ typedef struct FPSContext { · 85 unmodified lines
8686
8787 AVFrame *frames[2]; ///< buffered frames
8888 int frames_count; ///< number of buffered frames
89− AVCCFifo *cc_fifo; ///< closed captions
89+ CCFifo cc_fifo; ///< closed captions
9090
9191 int64_t next_pts; ///< pts of the next frame to output
9292
@@ -167,7 +167,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 74 unmodified lines
167167 frame = shift_frame(ctx, s);
168168 av_frame_free(&frame);
169169 }
170− ff_ccfifo_freep(&s->cc_fifo);
170+ ff_ccfifo_uninit(&s->cc_fifo);
171171
172172 av_log(ctx, AV_LOG_VERBOSE, "%d frames in, %d frames out; %d frames dropped, "
173173 "%d frames duplicated.\n", s->frames_in, s->frames_out, s->drop, s->dup);
@@ -213,9 +213,10 @@ static int config_props(AVFilterLink* outlink) · 39 unmodified lines
213213 s->in_pts_off, s->out_pts_off, s->start_time);
214214 }
215215
216− if (!(s->cc_fifo = ff_ccfifo_alloc(outlink->frame_rate, ctx))) {
216+ ret = ff_ccfifo_init(&s->cc_fifo, outlink->frame_rate, ctx);
217+ if (ret < 0) {
217218 av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n");
218− return AVERROR(ENOMEM);
219+ return ret;
219220 }
220221
221222 av_log(ctx, AV_LOG_VERBOSE, "fps=%d/%d\n", outlink->frame_rate.num, outlink->frame_rate.den);
@@ -250,7 +251,7 @@ static int read_frame(AVFilterContext *ctx, FPSContext *s, AVFilterLink *inlink, · 28 unmodified lines
250251 av_log(ctx, AV_LOG_DEBUG, "Read frame with in pts %"PRId64", out pts %"PRId64"\n",
251252 in_pts, frame->pts);
252253
253− ff_ccfifo_extract(s->cc_fifo, frame);
254+ ff_ccfifo_extract(&s->cc_fifo, frame);
254255 s->frames[s->frames_count++] = frame;
255256 s->frames_in++;
256257
@@ -298,7 +299,7 @@ static int write_frame(AVFilterContext *ctx, FPSContext *s, AVFilterLink *outlin · 41 unmodified lines
298299 if (!frame)
299300 return AVERROR(ENOMEM);
300301 // Make sure Closed Captions will not be duplicated
301− ff_ccfifo_inject(s->cc_fifo, frame);
302+ ff_ccfifo_inject(&s->cc_fifo, frame);
302303 frame->pts = s->next_pts++;
303304 frame->duration = 1;
304305
libavfilter/vf_tinterlace.c+9−9
@@ -203,7 +203,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 202 unmodified lines
203203 av_frame_free(&tinterlace->next);
204204 av_freep(&tinterlace->black_data[0][0]);
205205 av_freep(&tinterlace->black_data[1][0]);
206− ff_ccfifo_freep(&tinterlace->cc_fifo);
206+ ff_ccfifo_uninit(&tinterlace->cc_fifo);
207207 }
208208
209209 static int config_out_props(AVFilterLink *outlink)
@@ -212,7 +212,7 @@ static int config_out_props(AVFilterLink *outlink) · 2 unmodified lines
212212 AVFilterLink *inlink = outlink->src->inputs[0];
213213 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format);
214214 TInterlaceContext *tinterlace = ctx->priv;
215− int i;
215+ int ret, i;
216216
217217 tinterlace->vsub = desc->log2_chroma_h;
218218 outlink->w = inlink->w;
@@ -224,7 +224,6 @@ static int config_out_props(AVFilterLink *outlink) · 5 unmodified lines
224224
225225 if (tinterlace->mode == MODE_PAD) {
226226 uint8_t black[4] = { 0, 0, 0, 16 };
227− int ret;
228227 ff_draw_init(&tinterlace->draw, outlink->format, 0);
229228 ff_draw_color(&tinterlace->draw, &tinterlace->color, black);
230229 /* limited range */
@@ -292,9 +291,10 @@ static int config_out_props(AVFilterLink *outlink) · 61 unmodified lines
292291 #endif
293292 }
294293
295− if (!(tinterlace->cc_fifo = ff_ccfifo_alloc(outlink->frame_rate, ctx))) {
294+ ret = ff_ccfifo_init(&tinterlace->cc_fifo, outlink->frame_rate, ctx);
295+ if (ret < 0) {
296296 av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n");
297− return AVERROR(ENOMEM);
297+ return ret;
298298 }
299299
300300 av_log(ctx, AV_LOG_VERBOSE, "mode:%d filter:%s h:%d -> h:%d\n", tinterlace->mode,
@@ -381,7 +381,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref) · 80 unmodified lines
381381 tinterlace->cur = tinterlace->next;
382382 tinterlace->next = picref;
383383
384− ff_ccfifo_extract(tinterlace->cc_fifo, picref);
384+ ff_ccfifo_extract(&tinterlace->cc_fifo, picref);
385385
386386 cur = tinterlace->cur;
387387 next = tinterlace->next;
@@ -464,7 +464,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 76 unmodified lines
464464 if (!out)
465465 return AVERROR(ENOMEM);
466466 out->pts /= 2; // adjust pts to new framerate
467− ff_ccfifo_inject(tinterlace->cc_fifo, out);
467+ ff_ccfifo_inject(&tinterlace->cc_fifo, out);
468468 ret = ff_filter_frame(outlink, out);
469469 return ret;
470470 }
@@ -514,7 +514,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 43 unmodified lines
514514 out->pts = cur->pts*2;
515515
516516 out->pts = av_rescale_q(out->pts, tinterlace->preout_time_base, outlink->time_base);
517− ff_ccfifo_inject(tinterlace->cc_fifo, out);
517+ ff_ccfifo_inject(&tinterlace->cc_fifo, out);
518518 if ((ret = ff_filter_frame(outlink, out)) < 0)
519519 return ret;
520520
@@ -559,7 +559,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 38 unmodified lines
559559
560560 out->pts = av_rescale_q(out->pts, tinterlace->preout_time_base, outlink->time_base);
561561 out->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base);
562− ff_ccfifo_inject(tinterlace->cc_fifo, out);
562+ ff_ccfifo_inject(&tinterlace->cc_fifo, out);
563563 ret = ff_filter_frame(outlink, out);
564564
565565 return ret;
libavfilter/vf_yadif.c+5−3
@@ -261,7 +261,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 260 unmodified lines
261261 av_frame_free(&yadif->prev);
262262 av_frame_free(&yadif->cur );
263263 av_frame_free(&yadif->next);
264− ff_ccfifo_freep(&yadif->cc_fifo);
264+ ff_ccfifo_uninit(&yadif->cc_fifo);
265265 }
266266
267267 static const enum AVPixelFormat pix_fmts[] = {
@@ -286,6 +286,7 @@ static int config_output(AVFilterLink *outlink) · 18 unmodified lines
286286 {
287287 AVFilterContext *ctx = outlink->src;
288288 YADIFContext *s = ctx->priv;
289+ int ret;
289290
290291 outlink->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2});
291292 outlink->w = ctx->inputs[0]->w;
@@ -297,9 +298,10 @@ static int config_output(AVFilterLink *outlink) · 5 unmodified lines
297298 else
298299 outlink->frame_rate = ctx->inputs[0]->frame_rate;
299300
300− if (!(s->cc_fifo = ff_ccfifo_alloc(outlink->frame_rate, ctx))) {
301+ ret = ff_ccfifo_init(&s->cc_fifo, outlink->frame_rate, ctx);
302+ if (ret < 0) {
301303 av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n");
302− return AVERROR(ENOMEM);
304+ return ret;
303305 }
304306
305307 if (outlink->w < 3 || outlink->h < 3) {
libavfilter/vf_yadif_cuda.c+3−3
@@ -205,7 +205,7 @@ static av_cold void deint_cuda_uninit(AVFilterContext *ctx) · 204 unmodified lines
205205 av_frame_free(&y->prev);
206206 av_frame_free(&y->cur);
207207 av_frame_free(&y->next);
208− ff_ccfifo_freep(&y->cc_fifo);
208+ ff_ccfifo_uninit(&y->cc_fifo);
209209
210210 av_buffer_unref(&s->device_ref);
211211 s->hwctx = NULL;
@@ -295,9 +295,9 @@ static int config_output(AVFilterLink *link) · 83 unmodified lines
295295 else
296296 link->frame_rate = ctx->inputs[0]->frame_rate;
297297
298− if (!(y->cc_fifo = ff_ccfifo_alloc(link->frame_rate, ctx))) {
298+ ret = ff_ccfifo_init(&y->cc_fifo, link->frame_rate, ctx);
299+ if (ret < 0) {
299300 av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n");
300− ret = AVERROR(ENOMEM);
301301 goto exit;
302302 }
303303
libavfilter/yadif.h+1−1
@@ -77,7 +77,7 @@ typedef struct YADIFContext { · 76 unmodified lines
7777 int eof;
7878 uint8_t *temp_line;
7979 int temp_line_size;
80− AVCCFifo *cc_fifo;
80+ CCFifo cc_fifo;
8181
8282 /*
8383 * An algorithm that treats first and/or last fields in a sequence
libavfilter/yadif_common.c+3−3
@@ -66,7 +66,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 65 unmodified lines
6666 }
6767 }
6868
69− ff_ccfifo_inject(yadif->cc_fifo, yadif->out);
69+ ff_ccfifo_inject(&yadif->cc_fifo, yadif->out);
7070 ret = ff_filter_frame(ctx->outputs[0], yadif->out);
7171
7272 yadif->frame_pending = (yadif->mode&1) && !is_second;
@@ -103,7 +103,7 @@ int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame) · 30 unmodified lines
103103
104104 av_assert0(frame);
105105
106− ff_ccfifo_extract(yadif->cc_fifo, frame);
106+ ff_ccfifo_extract(&yadif->cc_fifo, frame);
107107
108108 if (yadif->frame_pending)
109109 return_frame(ctx, 1);
@@ -146,7 +146,7 @@ int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame) · 36 unmodified lines
146146 if (!yadif->out)
147147 return AVERROR(ENOMEM);
148148
149− ff_ccfifo_inject(yadif->cc_fifo, yadif->out);
149+ ff_ccfifo_inject(&yadif->cc_fifo, yadif->out);
150150 av_frame_free(&yadif->prev);
151151 if (yadif->out->pts != AV_NOPTS_VALUE)
152152 yadif->out->pts *= 2;

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