MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / closePrivData

Function closePrivData

libhb/decavcodec.c:560–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560static void closePrivData( hb_work_private_t ** ppv )
561{
562 hb_work_private_t * pv = *ppv;
563
564 if ( pv )
565 {
566 hb_buffer_list_close(&pv->list);
567
568 if ( pv->job && pv->context && pv->context->codec )
569 {
570 hb_log( "%s-decoder done: %u frames, %u decoder errors",
571 pv->context->codec->name, pv->nframes, pv->decode_errors);
572 }
573 av_frame_free(&pv->frame);
574 av_frame_free(&pv->hw_frame);
575 close_video_filters(pv);
576 if ( pv->parser )
577 {
578 av_parser_close(pv->parser);
579 }
580 if ( pv->context && pv->context->codec )
581 {
582 hb_avcodec_free_context(&pv->context);
583 }
584 if ( pv->context )
585 {
586 if (pv->context->hw_device_ctx)
587 {
588 av_buffer_unref(&pv->context->hw_device_ctx);
589 }
590 hb_avcodec_free_context(&pv->context);
591 }
592 av_packet_free(&pv->pkt);
593 hb_audio_resample_free(pv->resample);
594
595 int ii;
596 for (ii = 0; ii < REORDERED_HASH_SZ; ii++)
597 {
598 free(pv->reordered_hash[ii]);
599 }
600
601 hb_list_close(&pv->list_subtitle);
602
603 free(pv);
604 }
605 *ppv = NULL;
606}
607
608static void decavcodecClose( hb_work_object_t * w )
609{

Callers 1

decavcodecCloseFunction · 0.85

Calls 6

hb_buffer_list_closeFunction · 0.85
hb_logFunction · 0.85
close_video_filtersFunction · 0.85
hb_avcodec_free_contextFunction · 0.85
hb_audio_resample_freeFunction · 0.85
hb_list_closeFunction · 0.85

Tested by

no test coverage detected