Skip to content

Commit

Permalink
videosequence: return an empty frame if no preroll available
Browse files Browse the repository at this point in the history
  • Loading branch information
rjw57 committed Apr 2, 2016
1 parent 497aa70 commit a8e64c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions videosequence/__init__.py
Expand Up @@ -137,6 +137,9 @@ def _get_frame(self, index):
assert self.current_index == index

sample = self.appsink.pull_preroll()
if sample is None:
LOG.warn("Returning empty frame since no preroll available")
return Image.new("RGB", (self.width, self.height))
return _sample_to_image(sample)

def _get_slice(self, slc):
Expand Down

0 comments on commit a8e64c5

Please sign in to comment.