@@ -27,12 +27,12 @@ int system_header_read(struct ps_system_header_t* h, struct mpeg_bits_t* reader)
27
27
h -> CSPS_flag = (v8 >> 0 ) & 0x01 ;
28
28
29
29
v8 = mpeg_bits_read8 (reader );
30
- assert ((0x20 & v8 ) == 0x20 ); // 'xx1xxxxx'
30
+ // assert((0x20 & v8) == 0x20); // 'xx1xxxxx'
31
31
h -> system_audio_lock_flag = (v8 >> 7 ) & 0x01 ;
32
32
h -> system_video_lock_flag = (v8 >> 6 ) & 0x01 ;
33
33
h -> video_bound = v8 & 0x1F ;
34
34
35
- // assert((0x7F & data[11]) == 0x00); // 'x0000000'
35
+ //assert((0x7F & data[11]) == 0x00); // 'x0000000'
36
36
h -> packet_rate_restriction_flag = (mpeg_bits_read8 (reader ) >> 7 ) & 0x01 ;
37
37
38
38
for (i = 0 ; 0 == mpeg_bits_error (reader ) && mpeg_bits_tell (reader ) + 1 < end && i < sizeof (h -> streams ) / sizeof (h -> streams [0 ]); i ++ )
@@ -50,7 +50,7 @@ int system_header_read(struct ps_system_header_t* h, struct mpeg_bits_t* reader)
50
50
}
51
51
52
52
v16 = mpeg_bits_read16 (reader );
53
- assert ((v16 & 0xC000 ) == 0xC000 ); // '11xxxxxx'
53
+ // assert((v16 & 0xC000) == 0xC000); // '11xxxxxx'
54
54
h -> streams [i ].buffer_bound_scale = (v16 >> 13 ) & 0x01 ;
55
55
h -> streams [i ].buffer_size_bound = v16 & 0x1FFF ;
56
56
}
@@ -69,28 +69,28 @@ size_t system_header_read(struct ps_system_header_t *h, const uint8_t* data, siz
69
69
70
70
if (bytes < 12 ) return 0 ;
71
71
72
- assert (0x00 == data [0 ] && 0x00 == data [1 ] && 0x01 == data [2 ] && PES_SID_SYS == data [3 ]);
72
+ // assert(0x00 == data[0] && 0x00 == data[1] && 0x01 == data[2] && PES_SID_SYS == data[3]);
73
73
len = (data [4 ] << 8 ) | data [5 ];
74
74
if (len + 6 > bytes )
75
75
{
76
76
assert (0 );
77
77
return 0 ;
78
78
}
79
79
80
- assert ((0x80 & data [6 ]) == 0x80 ); // '1xxxxxxx'
81
- assert ((0x01 & data [8 ]) == 0x01 ); // 'xxxxxxx1'
80
+ // assert((0x80 & data[6]) == 0x80); // '1xxxxxxx'
81
+ // assert((0x01 & data[8]) == 0x01); // 'xxxxxxx1'
82
82
h -> rate_bound = ((data [6 ] & 0x7F ) << 15 ) | (data [7 ] << 7 ) | ((data [8 ] >> 1 ) & 0x7F );
83
83
84
84
h -> audio_bound = (data [9 ] >> 2 ) & 0x3F ;
85
85
h -> fixed_flag = (data [9 ] >> 1 ) & 0x01 ;
86
86
h -> CSPS_flag = (data [9 ] >> 0 ) & 0x01 ;
87
87
88
- assert ((0x20 & data [10 ]) == 0x20 ); // 'xx1xxxxx'
88
+ // assert((0x20 & data[10]) == 0x20); // 'xx1xxxxx'
89
89
h -> system_audio_lock_flag = (data [10 ] >> 7 ) & 0x01 ;
90
90
h -> system_video_lock_flag = (data [10 ] >> 6 ) & 0x01 ;
91
91
h -> video_bound = data [10 ] & 0x1F ;
92
92
93
- // assert((0x7F & data[11]) == 0x00); // 'x0000000'
93
+ //assert((0x7F & data[11]) == 0x00); // 'x0000000'
94
94
h -> packet_rate_restriction_flag = (data [11 ] >> 7 ) & 0x01 ;
95
95
96
96
i = 12 ;
@@ -106,7 +106,7 @@ size_t system_header_read(struct ps_system_header_t *h, const uint8_t* data, siz
106
106
i += 3 ;
107
107
}
108
108
109
- assert ((data [i ] & 0xC0 ) == 0xC0 ); // '11xxxxxx'
109
+ // assert((data[i] & 0xC0) == 0xC0); // '11xxxxxx'
110
110
h -> streams [j ].buffer_bound_scale = (data [i ] >> 5 ) & 0x01 ;
111
111
h -> streams [j ].buffer_size_bound = (data [i ] & 0x1F ) | data [i + 1 ];
112
112
i += 2 ;
0 commit comments