validate: fix crash if timeout when media_descriptor is None

Some tests may not have any media_descriptor. If those were failing to
shutdown after EOS we were calling get_protocol() on None.
This commit is contained in:
Guillaume Desmottes 2018-12-17 10:34:43 +01:00
parent 9a04ba5000
commit b1f22e7130

View file

@ -737,7 +737,7 @@ class GstValidateTest(Test):
if self._sent_eos_time is not None:
t = time.time()
if ((t - self._sent_eos_time)) > 30:
if self.media_descriptor.get_protocol() == Protocols.HLS:
if self.media_descriptor is not None and self.media_descriptor.get_protocol() == Protocols.HLS:
self.set_result(Result.PASSED,
"""Got no EOS 30 seconds after sending EOS,
in HLS known and tolerated issue: