| 2203 | } |
| 2204 | |
| 2205 | static void hb_init_subtitle_list(hb_stream_t *stream, hb_title_t *title) |
| 2206 | { |
| 2207 | int ii; |
| 2208 | int map_idx; |
| 2209 | int largest = -1; |
| 2210 | |
| 2211 | // First add all that were found in a map. |
| 2212 | for ( map_idx = 0; 1; map_idx++ ) |
| 2213 | { |
| 2214 | for ( ii = 0; ii < stream->pes.count; ii++ ) |
| 2215 | { |
| 2216 | if ( stream->pes.list[ii].stream_kind == S ) |
| 2217 | { |
| 2218 | if ( stream->pes.list[ii].map_idx == map_idx ) |
| 2219 | { |
| 2220 | pes_add_subtitle_to_title( stream, ii, title, -1 ); |
| 2221 | } |
| 2222 | if ( stream->pes.list[ii].map_idx > largest ) |
| 2223 | largest = stream->pes.list[ii].map_idx; |
| 2224 | } |
| 2225 | } |
| 2226 | if ( map_idx > largest ) |
| 2227 | break; |
| 2228 | } |
| 2229 | |
| 2230 | int count = hb_list_count( title->list_subtitle ); |
| 2231 | // Now add the reset. Sort them by stream id. |
| 2232 | for ( ii = 0; ii < stream->pes.count; ii++ ) |
| 2233 | { |
| 2234 | if ( stream->pes.list[ii].stream_kind == S ) |
| 2235 | { |
| 2236 | pes_add_subtitle_to_title( stream, ii, title, count ); |
| 2237 | } |
| 2238 | } |
| 2239 | } |
| 2240 | |
| 2241 | static void hb_init_audio_list(hb_stream_t *stream, hb_title_t *title) |
| 2242 | { |
no test coverage detected