spark: let cRecord use the demux passed as parameter

This commit is contained in:
Stefan Seyfried
2012-09-22 11:09:30 +02:00
parent 99a63b16ca
commit f0cee92240
2 changed files with 5 additions and 3 deletions

View File

@@ -22,13 +22,14 @@ void *execute_record_thread(void *c)
return NULL;
}
cRecord::cRecord(int /*num*/)
cRecord::cRecord(int num)
{
lt_info("%s\n", __func__);
lt_info("%s %d\n", __func__, num);
dmx = NULL;
record_thread_running = false;
file_fd = -1;
exit_flag = RECORD_STOPPED;
dmx_num = num;
}
cRecord::~cRecord()
@@ -59,7 +60,7 @@ bool cRecord::Start(int fd, unsigned short vpid, unsigned short * apids, int num
int i;
if (!dmx)
dmx = new cDemux(1);
dmx = new cDemux(dmx_num);
dmx->Open(DMX_TP_CHANNEL, NULL, 512*1024);
dmx->pesFilter(vpid);