Make sure that psip is deleted after we are done with it.
From: Erik Hovland <erik@hovland.org>
---
libs/libmythtv/mpeg/mpegstreamdata.cpp | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/libs/libmythtv/mpeg/mpegstreamdata.cpp b/libs/libmythtv/mpeg/mpegstreamdata.cpp
index ad07f4f..19e5dea 100644
|
a
|
b
|
void MPEGStreamData::DeleteCachedTable(PSIPTable *psip) const
|
| 1388 | 1388 | return; |
| 1389 | 1389 | |
| 1390 | 1390 | uint tid = psip->TableIDExtension(); |
| | 1391 | bool delete_psip = false; |
| 1391 | 1392 | |
| 1392 | 1393 | QMutexLocker locker(&_cache_lock); |
| 1393 | 1394 | if (_cached_ref_cnt[psip] > 0) |
| … |
… |
void MPEGStreamData::DeleteCachedTable(PSIPTable *psip) const
|
| 1399 | 1400 | (_cached_pats[(tid << 8) | psip->Section()] == psip)) |
| 1400 | 1401 | { |
| 1401 | 1402 | _cached_pats[(tid << 8) | psip->Section()] = NULL; |
| 1402 | | delete psip; |
| | 1403 | delete_psip = true; |
| 1403 | 1404 | } |
| 1404 | 1405 | else if ((TableID::PMT == psip->TableID()) && |
| 1405 | 1406 | (_cached_pmts[(tid << 8) | psip->Section()] == psip)) |
| 1406 | 1407 | { |
| 1407 | 1408 | _cached_pmts[(tid << 8) | psip->Section()] = NULL; |
| 1408 | | delete psip; |
| | 1409 | delete_psip = true; |
| 1409 | 1410 | } |
| 1410 | 1411 | else |
| 1411 | 1412 | { |
| … |
… |
void MPEGStreamData::DeleteCachedTable(PSIPTable *psip) const
|
| 1416 | 1417 | it = _cached_slated_for_deletion.find(psip); |
| 1417 | 1418 | if (it != _cached_slated_for_deletion.end()) |
| 1418 | 1419 | _cached_slated_for_deletion.erase(it); |
| | 1420 | |
| | 1421 | if (delete_psip) |
| | 1422 | { |
| | 1423 | delete(psip); |
| | 1424 | psip = NULL; |
| | 1425 | } |
| 1419 | 1426 | } |
| 1420 | 1427 | |
| 1421 | 1428 | void MPEGStreamData::CachePAT(const ProgramAssociationTable *_pat) |