Browse Source

Fix desc02 parser

Georgi Chorbadzhiyski 8 years ago
parent
commit
c4f2ddb208
1 changed files with 2 additions and 2 deletions
  1. 2 2
      descs.c

+ 2 - 2
descs.c View File

@@ -70,7 +70,7 @@ void ts_descriptor_dump(uint8_t *desc_data, int desc_data_len) {
70 70
 					        reserved                     : 5;
71 71
 					uint8_t escape:1, profile:3, level:4;
72 72
 				} vs;
73
-				if (this_length >= 2) {
73
+				if (this_length >= 1) {
74 74
 					vs.multiple_frame_rate_flag     = bit_on(data[0], bit_8);
75 75
 					vs.frame_rate_code              = (data[0] &~ 0x80) >> 3; // 1xxxx111
76 76
 					vs.mpeg1_only_flag              = bit_on(data[0], bit_3);
@@ -92,7 +92,7 @@ void ts_descriptor_dump(uint8_t *desc_data, int desc_data_len) {
92 92
 					ts_LOGf("%s  - constraint_parameter_flag    : %d\n", pad, vs.constraint_parameter_flag);
93 93
 					ts_LOGf("%s  - still_picture_flag           : %d\n", pad, vs.still_picture_flag);
94 94
 				}
95
-				if (this_length >= 3 && vs.mpeg1_only_flag == 0) {
95
+				if (this_length >= 2 && vs.mpeg1_only_flag == 0) {
96 96
 					vs.profile_and_level_indication = data[1];
97 97
 					vs.chroma_format                = data[2] >> 6;				// xx111111
98 98
 					vs.frame_rate_extension_flag    = bit_on(data[2], bit_6);	// 11x11111