Permalink
Browse files

Fix coverity false-positive

segment can never be null, as it was tested just above for NULL and function would have returned - 1. Count used in loop is always at a minimum of 2

Coverity-Id: 703685
  • Loading branch information...
jyavenard committed Jun 21, 2013
1 parent 7153ea8 commit b30860c2ba22d930d69532ebab6f26f7be205def
Showing with 6 additions and 0 deletions.
  1. +6 −0 mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
@@ -2883,6 +2883,12 @@ long long HLSRingBuffer::Seek(long long pos, int whence, bool has_lock)
}
else
{
if (segment == NULL) // can never happen, make coverity happy
{
// stream doesn't contain segment error can't continue,
// unknown error
return -1;
}
int32_t skip = ((postime - starttime) * segment->Size()) / segment->Duration();
segment->Read(NULL, skip);
}

0 comments on commit b30860c

Please sign in to comment.