Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bcf0846

Browse filesBrowse files
committed
Return None if duration or frame_count can't be parsed as integer (.mkv file)
1 parent 7b5ee07 commit bcf0846
Copy full SHA for bcf0846

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎ffprobe/ffprobe.py‎

Copy file name to clipboardExpand all lines: ffprobe/ffprobe.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def frames(self):
221221
try:
222222
frame_count = int(self.__dict__.get("nb_frames", ""))
223223
except ValueError:
224-
raise FFProbeError("None integer frame count")
224+
frame_count = None
225225
else:
226226
# When N/A is returned, set frame_count to 0 too
227227
frame_count = 0
@@ -239,7 +239,7 @@ def duration_seconds(self):
239239
try:
240240
duration = float(self.__dict__.get("duration", ""))
241241
except ValueError:
242-
raise FFProbeError("None numeric duration")
242+
duration = None
243243
else:
244244
duration = 0.0
245245

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.