Mercurial > mplayer.hg
comparison libmpdemux/asf_mmst_streaming.c @ 15181:ed74657f25b1
Use define instead of hardcodec value for max streams number
Pathc by Dominik 'Rathann' Mierzejewski
author | rtognimp |
---|---|
date | Sat, 16 Apr 2005 13:42:50 +0000 |
parents | 424386614ad5 |
children | 941b1a71351f |
comparison
equal
deleted
inserted
replaced
15180:3d27bde7c654 | 15181:ed74657f25b1 |
---|---|
40 | 40 |
41 #include "network.h" | 41 #include "network.h" |
42 | 42 |
43 #define BUF_SIZE 102400 | 43 #define BUF_SIZE 102400 |
44 #define HDR_BUF_SIZE 8192 | 44 #define HDR_BUF_SIZE 8192 |
45 #define MAX_STREAMS 20 | |
45 | 46 |
46 typedef struct | 47 typedef struct |
47 { | 48 { |
48 uint8_t buf[BUF_SIZE]; | 49 uint8_t buf[BUF_SIZE]; |
49 int num_bytes; | 50 int num_bytes; |
50 | 51 |
51 } command_t; | 52 } command_t; |
52 | 53 |
53 static int seq_num; | 54 static int seq_num; |
54 static int num_stream_ids; | 55 static int num_stream_ids; |
55 static int stream_ids[20]; | 56 static int stream_ids[MAX_STREAMS]; |
56 | 57 |
57 static int get_data (int s, char *buf, size_t count); | 58 static int get_data (int s, char *buf, size_t count); |
58 | 59 |
59 static void put_32 (command_t *cmd, uint32_t value) | 60 static void put_32 (command_t *cmd, uint32_t value) |
60 { | 61 { |
332 | 333 |
333 int stream_id = header[i+48] | header[i+49] << 8; | 334 int stream_id = header[i+48] | header[i+49] << 8; |
334 | 335 |
335 printf ("stream object, stream id: %d\n", stream_id); | 336 printf ("stream object, stream id: %d\n", stream_id); |
336 | 337 |
337 if (num_stream_ids < 20) { | 338 if (num_stream_ids < MAX_STREAMS) { |
338 stream_ids[num_stream_ids] = stream_id; | 339 stream_ids[num_stream_ids] = stream_id; |
339 num_stream_ids++; | 340 num_stream_ids++; |
340 } else { | 341 } else { |
341 printf ("too many id, stream skipped"); | 342 printf ("too many id, stream skipped"); |
342 } | 343 } |