MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_decklink_write_trailer

Function ff_decklink_write_trailer

libavdevice/decklink_enc.cpp:398–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398av_cold int ff_decklink_write_trailer(AVFormatContext *avctx)
399{
400 struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
401 struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
402
403 if (ctx->playback_started) {
404 BMDTimeValue actual;
405 ctx->dlo->StopScheduledPlayback(ctx->last_pts * ctx->bmd_tb_num,
406 &actual, ctx->bmd_tb_den);
407 ctx->dlo->DisableVideoOutput();
408 if (ctx->audio)
409 ctx->dlo->DisableAudioOutput();
410 }
411
412 ff_decklink_cleanup(avctx);
413
414 if (ctx->output_callback)
415 delete ctx->output_callback;
416
417 pthread_mutex_destroy(&ctx->mutex);
418 pthread_cond_destroy(&ctx->cond);
419
420#if CONFIG_LIBKLVANC
421 klvanc_context_destroy(ctx->vanc_ctx);
422#endif
423 ff_decklink_packet_queue_end(&ctx->vanc_queue);
424
425 ff_ccfifo_uninit(&ctx->cc_fifo);
426 av_freep(&cctx->ctx);
427
428 return 0;
429}
430
431#if CONFIG_LIBKLVANC
432static void construct_cc(AVFormatContext *avctx, struct decklink_ctx *ctx,

Callers

nothing calls this directly

Calls 6

ff_decklink_cleanupFunction · 0.85
ff_ccfifo_uninitFunction · 0.85
av_freepFunction · 0.85
pthread_mutex_destroyFunction · 0.50
pthread_cond_destroyFunction · 0.50

Tested by

no test coverage detected