| 5172 | } |
| 5173 | |
| 5174 | static 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 | |
| 5200 | void hb_stream_set_need_keyframe(hb_stream_t *stream, int need_keyframe) |
| 5201 | { |
no test coverage detected