mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 21:46:22 +00:00
validate: Properly check that outputed videos have a correct duration
This commit is contained in:
parent
cdb8822ae3
commit
720b9eff47
1 changed files with 10 additions and 5 deletions
|
@ -332,12 +332,17 @@ class GstValidateTranscodingTest(GstValidateTest):
|
||||||
return self.get_current_size()
|
return self.get_current_size()
|
||||||
|
|
||||||
def check_results(self):
|
def check_results(self):
|
||||||
if self.result is Result.PASSED and not self.scenario:
|
if self.result in [Result.FAILED, Result.TIMEOUT]:
|
||||||
orig_duration = long(self.media_descriptor.get_duration())
|
|
||||||
res, msg = compare_rendered_with_original(orig_duration, self.dest_file)
|
|
||||||
self.set_result(res, msg)
|
|
||||||
elif self.message == "":
|
|
||||||
GstValidateTest.check_results(self)
|
GstValidateTest.check_results(self)
|
||||||
|
return
|
||||||
|
|
||||||
|
if self.scenario:
|
||||||
|
orig_duration = min(long(self.scenario.get_duration()),
|
||||||
|
long(self.media_descriptor.get_duration()))
|
||||||
|
else:
|
||||||
|
orig_duration = long(self.media_descriptor.get_duration())
|
||||||
|
res, msg = compare_rendered_with_original(orig_duration, self.dest_file)
|
||||||
|
self.set_result(res, msg)
|
||||||
|
|
||||||
|
|
||||||
class GstValidateManager(TestsManager, Loggable):
|
class GstValidateManager(TestsManager, Loggable):
|
||||||
|
|
Loading…
Reference in a new issue