Changeset b61170f5 in ffmpeg
- Timestamp:
- Feb 11, 2015, 12:59:14 AM (10 years ago)
- Branches:
- master
- Children:
- 2924514
- Parents:
- 702cf8d0 (diff), 1509c018 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libavformat/mpegts.c
r702cf8d0 rb61170f5 519 519 } 520 520 521 static int analyze(const uint8_t *buf, int size, int packet_size, int *index) 521 static int analyze(const uint8_t *buf, int size, int packet_size, int *index, 522 int probe) 522 523 { 523 524 int stat[TS_MAX_PACKET_SIZE]; … … 529 530 530 531 for (i = 0; i < size - 3; i++) { 531 if (buf[i] == 0x47 && !(buf[i + 1] & 0x80) && buf[i + 3] != 0x47) { 532 if (buf[i] == 0x47 && 533 (!probe || (!(buf[i + 1] & 0x80) && buf[i + 3] != 0x47))) { 532 534 int x = i % packet_size; 533 535 stat[x]++; … … 552 554 return AVERROR_INVALIDDATA; 553 555 554 score = analyze(buf, size, TS_PACKET_SIZE, NULL);555 dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL );556 fec_score = analyze(buf, size, TS_FEC_PACKET_SIZE, NULL);556 score = analyze(buf, size, TS_PACKET_SIZE, NULL, 0); 557 dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL, 0); 558 fec_score = analyze(buf, size, TS_FEC_PACKET_SIZE, NULL, 0); 557 559 av_dlog(NULL, "score: %d, dvhs_score: %d, fec_score: %d \n", 558 560 score, dvhs_score, fec_score); … … 2395 2397 for (i = 0; i<check_count; i+=CHECK_BLOCK) { 2396 2398 int left = FFMIN(check_count - i, CHECK_BLOCK); 2397 int score = analyze(p->buf + TS_PACKET_SIZE *i, TS_PACKET_SIZE *left, TS_PACKET_SIZE , NULL );2398 int dvhs_score = analyze(p->buf + TS_DVHS_PACKET_SIZE*i, TS_DVHS_PACKET_SIZE*left, TS_DVHS_PACKET_SIZE, NULL );2399 int fec_score = analyze(p->buf + TS_FEC_PACKET_SIZE *i, TS_FEC_PACKET_SIZE *left, TS_FEC_PACKET_SIZE , NULL );2399 int score = analyze(p->buf + TS_PACKET_SIZE *i, TS_PACKET_SIZE *left, TS_PACKET_SIZE , NULL, 1); 2400 int dvhs_score = analyze(p->buf + TS_DVHS_PACKET_SIZE*i, TS_DVHS_PACKET_SIZE*left, TS_DVHS_PACKET_SIZE, NULL, 1); 2401 int fec_score = analyze(p->buf + TS_FEC_PACKET_SIZE *i, TS_FEC_PACKET_SIZE *left, TS_FEC_PACKET_SIZE , NULL, 1); 2400 2402 score = FFMAX3(score, dvhs_score, fec_score); 2401 2403 sumscore += score;
Note:
See TracChangeset
for help on using the changeset viewer.