| 2459 | } |
| 2460 | |
| 2461 | static 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 | |
| 2486 | hb_work_object_t hb_decavcodecv = |
| 2487 | { |
nothing calls this directly
no test coverage detected