Ticket #5321: mediagoblin-video.patch

File mediagoblin-video.patch, 682 bytes (added by anongoblin, 9 years ago)
  • mediagoblin/media_types/video/transcoders.py

    diff --git a/mediagoblin/media_types/video/transcoders.py b/mediagoblin/media_types/video/transcoders.py
    index ba469af..6e0b702 100644
    a b def capture_thumb(video_path, dest_path, width=None, height=None, percent=0.5):  
    132132    buffer = sample.get_buffer()
    133133
    134134    # get the image from the buffer and save it to disk
    135     im = Image.frombytes('RGB', (width, height),
     135    im = Image.fromstring('RGB', (width, height),
    136136                         buffer.extract_dup(0, buffer.get_size()))
    137137    im.save(dest_path)
    138138    _log.info('thumbnail saved to {0}'.format(dest_path))