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

Function decavcodecvFlush

libhb/decavcodec.c:2461–2484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2459}
2460
2461static void decavcodecvFlush( hb_work_object_t *w )
2462{
2463 hb_work_private_t *pv = w->private_data;
2464
2465 if (pv->context != NULL && pv->context->codec != NULL)
2466 {
2467 hb_buffer_list_close(&pv->list);
2468 if ( pv->title->opaque_priv == NULL )
2469 {
2470 pv->video_codec_opened = 0;
2471 hb_avcodec_free_context(&pv->context);
2472 if ( pv->parser )
2473 {
2474 av_parser_close(pv->parser);
2475 }
2476 pv->parser = av_parser_init( w->codec_param );
2477 pv->context = avcodec_alloc_context3( pv->codec );
2478 }
2479 else
2480 {
2481 avcodec_flush_buffers( pv->context );
2482 }
2483 }
2484}
2485
2486hb_work_object_t hb_decavcodecv =
2487{

Callers

nothing calls this directly

Calls 2

hb_buffer_list_closeFunction · 0.85
hb_avcodec_free_contextFunction · 0.85

Tested by

no test coverage detected