| 899 | } |
| 900 | |
| 901 | static int new_pid( hb_stream_t * stream ) |
| 902 | { |
| 903 | int num = stream->ts.alloc; |
| 904 | |
| 905 | if ( stream->ts.count == stream->ts.alloc ) |
| 906 | { |
| 907 | num = stream->ts.alloc ? stream->ts.alloc * 2 : 32; |
| 908 | stream->ts.list = realloc( stream->ts.list, |
| 909 | sizeof( hb_ts_stream_t ) * num ); |
| 910 | } |
| 911 | int ii; |
| 912 | for ( ii = stream->ts.alloc; ii < num; ii++ ) |
| 913 | { |
| 914 | memset(&stream->ts.list[ii], 0, sizeof( hb_ts_stream_t )); |
| 915 | stream->ts.list[ii].continuity = -1; |
| 916 | stream->ts.list[ii].pid = -1; |
| 917 | stream->ts.list[ii].pes_list = -1; |
| 918 | } |
| 919 | stream->ts.alloc = num; |
| 920 | num = stream->ts.count; |
| 921 | stream->ts.count++; |
| 922 | |
| 923 | return num; |
| 924 | } |
| 925 | |
| 926 | static int new_pes( hb_stream_t * stream ) |
| 927 | { |