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

Function videoParserFlush

libhb/decavcodec.c:2118–2153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2116}
2117
2118static void videoParserFlush(hb_work_object_t * w)
2119{
2120 hb_work_private_t * pv = w->private_data;
2121 int result;
2122 uint8_t * pout = NULL;
2123 int pout_len = 0;
2124 int64_t parser_pts = AV_NOPTS_VALUE;
2125 int64_t parser_dts = AV_NOPTS_VALUE;
2126
2127 do
2128 {
2129 if (pv->parser)
2130 {
2131 av_parser_parse2(pv->parser, pv->context, &pout, &pout_len,
2132 NULL, 0,
2133 AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0 );
2134 parser_pts = pv->parser->pts;
2135 parser_dts = pv->parser->dts;
2136 }
2137
2138 if (pout != NULL && pout_len > 0)
2139 {
2140 pv->packet_info.data = pout;
2141 pv->packet_info.size = pout_len;
2142 pv->packet_info.pts = parser_pts;
2143 pv->packet_info.dts = parser_dts;
2144
2145 result = decodePacket(w);
2146 if (result != HB_WORK_OK)
2147 {
2148 break;
2149 }
2150 w->frame_count++;
2151 }
2152 } while (pout != NULL && pout_len > 0);
2153}
2154
2155static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
2156 hb_buffer_t ** buf_out )

Callers 1

decavcodecvWorkFunction · 0.85

Calls 1

decodePacketFunction · 0.85

Tested by

no test coverage detected