Now doesn't fail with AVPROBE or FFPROBE if a file doesn't have streams

This commit is contained in:
Sergio Costas 2015-01-16 01:30:44 +01:00
parent 0a437b5bbb
commit f765450864
4 changed files with 10 additions and 1 deletions

View file

@ -88,6 +88,9 @@ class avprobe(devede.executor.executor):
except:
return True # There was an error reading the JSON data
if not("streams" in video_data):
return True # There are no streams!!!!!
for element in video_data["streams"]:
if (self.original_length == -1) and ("duration" in element):