Fixed segfault when connecting to a stream that is currently shutting down.
This commit is contained in:
parent
97975deede
commit
d2df5d2cae
1 changed files with 1 additions and 0 deletions
|
@ -413,6 +413,7 @@ namespace Mist {
|
||||||
snprintf(id, NAME_BUFFER_SIZE, SHM_TRACK_INDEX, streamName.c_str(), trackId);
|
snprintf(id, NAME_BUFFER_SIZE, SHM_TRACK_INDEX, streamName.c_str(), trackId);
|
||||||
nProxy.metaPages[trackId].init(id, 8 * 1024);
|
nProxy.metaPages[trackId].init(id, 8 * 1024);
|
||||||
}
|
}
|
||||||
|
if (!nProxy.metaPages[trackId].mapped){return -1;}
|
||||||
int len = nProxy.metaPages[trackId].len / 8;
|
int len = nProxy.metaPages[trackId].len / 8;
|
||||||
for (int i = 0; i < len; i++){
|
for (int i = 0; i < len; i++){
|
||||||
int * tmpOffset = (int *)(nProxy.metaPages[trackId].mapped + (i * 8));
|
int * tmpOffset = (int *)(nProxy.metaPages[trackId].mapped + (i * 8));
|
||||||
|
|
Loading…
Add table
Reference in a new issue