Ticket #1907: sr3.diff

File sr3.diff, 1.1 KB (added by mythdev@…, 14 years ago)
  • mythtv/libs/libmythtv/dvbsignalmonitor.cpp

     
    380380 */
    381381void DVBSignalMonitor::RunTableMonitorSR(void)
    382382{
    383     int buffer_size = 4192;  // maximum size of Section we handle
    384     unsigned char *buffer = new unsigned char[buffer_size];
    385     if (!buffer)
    386         return;
     383    unsigned char buffer[4192];
    387384
    388385    VERBOSE(VB_CHANNEL, LOC + "RunTableMonitorSR(): " +
    389386            QString("begin (# of pids %1)")
     
    397394        FilterMap::const_iterator fit = filters.begin();
    398395        for (; fit != filters.end(); ++fit)
    399396        {
    400             int len = read(fit.data() /* mux_fd */, &buffer, buffer_size);
     397            int len = read(fit.data() /* mux_fd */, &buffer, sizeof(buffer));
    401398            if (len <= 0)
    402399                continue;
    403400
     
    427424            RemovePIDFilter(*dit);
    428425    }
    429426
    430     delete[] buffer;
    431 
    432427    VERBOSE(VB_CHANNEL, LOC + "RunTableMonitorSR(): " + "end");
    433428}
    434429