| 3727 | } |
| 3728 | |
| 3729 | static void ts_pes_list_add( hb_stream_t *stream, int ts_idx, int pes_idx ) |
| 3730 | { |
| 3731 | int ii = stream->ts.list[ts_idx].pes_list; |
| 3732 | if ( ii == -1 ) |
| 3733 | { |
| 3734 | stream->ts.list[ts_idx].pes_list = pes_idx; |
| 3735 | return; |
| 3736 | } |
| 3737 | |
| 3738 | int idx; |
| 3739 | while ( ii != -1 ) |
| 3740 | { |
| 3741 | if ( ii == pes_idx ) // Already in list |
| 3742 | return; |
| 3743 | idx = ii; |
| 3744 | ii = stream->pes.list[ii].next; |
| 3745 | } |
| 3746 | stream->pes.list[idx].next = pes_idx; |
| 3747 | } |
| 3748 | |
| 3749 | static int update_ts_streams( hb_stream_t * stream, int pid, int stream_id_ext, int stream_type, int in_kind, int *out_pes_idx ) |
| 3750 | { |