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

Function hb_ts_stream_decode

libhb/stream.c:5174–5198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5172}
5173
5174static hb_buffer_t * hb_ts_stream_decode( hb_stream_t *stream )
5175{
5176 hb_buffer_t * b;
5177
5178 // spin until we get a packet of data from some stream or hit eof
5179 while ( 1 )
5180 {
5181 const uint8_t *buf = next_packet(stream);
5182 if ( buf == NULL )
5183 {
5184 // end of file - we didn't finish filling our ps write buffer
5185 // so just discard the remainder (the partial buffer is useless)
5186 hb_log("hb_ts_stream_decode - eof");
5187 b = flush_ts_streams(stream);
5188 return b;
5189 }
5190
5191 b = hb_ts_decode_pkt( stream, buf, 0, 0 );
5192 if ( b )
5193 {
5194 return b;
5195 }
5196 }
5197 return NULL;
5198}
5199
5200void hb_stream_set_need_keyframe(hb_stream_t *stream, int need_keyframe)
5201{

Callers 2

hb_stream_readFunction · 0.85
hb_ts_resolve_pid_typesFunction · 0.85

Calls 4

hb_logFunction · 0.85
flush_ts_streamsFunction · 0.85
hb_ts_decode_pktFunction · 0.85
next_packetFunction · 0.70

Tested by

no test coverage detected