int raw_packet_size;
/** if true, all pids are analyzed to find streams */
int auto_guess;
- int set_service_ret;
/** compute exact PCR for each transport stream packet */
int mpeg2ts_compute_pcr;
const uint8_t *p;
int len, code;
+ if(!ts->pkt)
+ return;
+
if (is_start) {
pes->state = MPEGTS_HEADER;
pes->data_index = 0;
static void set_service_cb(void *opaque, int ret)
{
MpegTSContext *ts = opaque;
- ts->set_service_ret = ret;
ts->stop_parse = 1;
}
/* normal demux */
if (!ts->auto_guess) {
- ts->set_service_ret = -1;
-
/* first do a scaning to get all the services */
url_fseek(pb, pos, SEEK_SET);
mpegts_scan_sdt(ts);
}
/* tune to first service found */
- for(i=0; i<ts->nb_services && ts->set_service_ret; i++){
+ for(i=0; i<ts->nb_services; i++){
service = ts->services[i];
sid = service->sid;
#ifdef DEBUG_SI
}
/* if could not find service, enable auto_guess */
- if (ts->set_service_ret != 0)
ts->auto_guess = 1;
#ifdef DEBUG_SI