winlin

fix build failed for stdc++

@@ -154,7 +154,8 @@ int main(int argc, char** argv) @@ -154,7 +154,8 @@ int main(int argc, char** argv)
154 int pts = 0; 154 int pts = 0;
155 // @remark, to decode the file. 155 // @remark, to decode the file.
156 char* p = h264_raw; 156 char* p = h264_raw;
157 - for (int count = 0; p < h264_raw + file_size; count++) { 157 + int count = 0;
  158 + for (; p < h264_raw + file_size;) {
158 // @remark, read a frame from file buffer. 159 // @remark, read a frame from file buffer.
159 char* data = NULL; 160 char* data = NULL;
160 int size = 0; 161 int size = 0;
@@ -188,7 +189,7 @@ int main(int argc, char** argv) @@ -188,7 +189,7 @@ int main(int argc, char** argv)
188 (nut == 7? "SPS":(nut == 8? "PPS":(nut == 5? "I":(nut == 1? "P":(nut == 9? "AUD":(nut == 6? "SEI":"Unknown"))))))); 189 (nut == 7? "SPS":(nut == 8? "PPS":(nut == 5? "I":(nut == 1? "P":(nut == 9? "AUD":(nut == 6? "SEI":"Unknown")))))));
189 190
190 // @remark, when use encode device, it not need to sleep. 191 // @remark, when use encode device, it not need to sleep.
191 - if (count == 10) { 192 + if (count++ == 9) {
192 usleep(1000 * 1000 * count / fps); 193 usleep(1000 * 1000 * count / fps);
193 count = 0; 194 count = 0;
194 } 195 }