fixed a nullreference

This commit is contained in:
Marcel van der Veldt 2015-05-07 00:11:21 +02:00
parent 986a37455e
commit 6a3feb5f77

View file

@ -101,8 +101,10 @@ class API():
for mediaStream in MediaStreams: for mediaStream in MediaStreams:
if(mediaStream.get("Type") == "Video"): if(mediaStream.get("Type") == "Video"):
videocodec = mediaStream.get("Codec") videocodec = mediaStream.get("Codec")
height = int(mediaStream.get("Height")) if mediaStream.get("Height"):
width = int(mediaStream.get("Width")) height = int(mediaStream.get("Height"))
if mediaStream.get("Width"):
width = int(mediaStream.get("Width"))
aspectratio = mediaStream.get("AspectRatio") aspectratio = mediaStream.get("AspectRatio")
Video3DFormat = item.get("Video3DFormat") Video3DFormat = item.get("Video3DFormat")
if aspectratio != None and len(aspectratio) >= 3: if aspectratio != None and len(aspectratio) >= 3: