Ticket #1459: pes_alloc-fix.patch

File pes_alloc-fix.patch, 839 bytes (added by Janne <janne-mythtv@…>, 19 years ago)
  • libs/libmythtv/mpeg/pespacket.cpp

     
    174174    alloc188.erase(ptr);
    175175    free188.push_back(ptr);
    176176    // free the allocator only if more than 1 block was used
    177     if (mem188.size() > 1)
     177    if (alloc188.size() == 0 && mem188.size() > 1)
    178178    {
    179179        vector<unsigned char*>::iterator it;
    180180        for (it = mem188.begin(); it != mem188.end(); ++it)
     
    232232#endif
    233233
    234234    // free the allocator only if more than 1 block was used
    235     if (mem4096.size() > 1)
     235    if (alloc4096.size() == 0 && mem4096.size() > 1)
    236236    {
    237237        vector<unsigned char*>::iterator it;
    238238        for (it = mem4096.begin(); it != mem4096.end(); ++it)