comparison mpegts.c @ 2127:e70e06400158 libavformat

remove fake service/provider names used for PAT this allows us to distingush if the info came from SDT or PAT and will allow to dyamically fill info in ...
author michael
date Mon, 04 Jun 2007 11:25:33 +0000
parents d21480a68906
children 42fe0d356a7d
comparison
equal deleted inserted replaced
2126:d21480a68906 2127:e70e06400158
582 { 582 {
583 MpegTSContext *ts = opaque; 583 MpegTSContext *ts = opaque;
584 SectionHeader h1, *h = &h1; 584 SectionHeader h1, *h = &h1;
585 const uint8_t *p, *p_end; 585 const uint8_t *p, *p_end;
586 int sid, pmt_pid; 586 int sid, pmt_pid;
587 char *provider_name, *name;
588 char buf[256];
589 587
590 #ifdef DEBUG_SI 588 #ifdef DEBUG_SI
591 av_log(ts->stream, AV_LOG_DEBUG, "PAT:\n"); 589 av_log(ts->stream, AV_LOG_DEBUG, "PAT:\n");
592 av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len); 590 av_hex_dump_log(ts->stream, AV_LOG_DEBUG, (uint8_t *)section, section_len);
593 #endif 591 #endif
609 av_log(ts->stream, AV_LOG_DEBUG, "sid=0x%x pid=0x%x\n", sid, pmt_pid); 607 av_log(ts->stream, AV_LOG_DEBUG, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
610 #endif 608 #endif
611 if (sid == 0x0000) { 609 if (sid == 0x0000) {
612 /* NIT info */ 610 /* NIT info */
613 } else { 611 } else {
614 /* add the service with a dummy name */ 612 new_service(ts, sid, NULL, NULL);
615 snprintf(buf, sizeof(buf), "Service %x\n", sid);
616 name = av_strdup(buf);
617 provider_name = av_strdup("");
618 if (name && provider_name) {
619 new_service(ts, sid, provider_name, name);
620 } else {
621 av_freep(&name);
622 av_freep(&provider_name);
623 }
624 } 613 }
625 } 614 }
626 ts->stop_parse = 1; 615 ts->stop_parse = 1;
627 616
628 /* remove filter */ 617 /* remove filter */