Removing an unnecessary video write

In the case of if we're skipping transcoding, we don't need to copy
this file at all!

This commit sponsored by Frank Zambrini III.  Thanks!
This commit is contained in:
Christopher Allan Webber 2013-03-04 11:53:04 -06:00
parent 55c7bf592c
commit f51a416778

View File

@ -25,7 +25,6 @@ from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from . import transcoders from . import transcoders
from .util import skip_transcode from .util import skip_transcode
_log = logging.getLogger(__name__) _log = logging.getLogger(__name__)
_log.setLevel(logging.DEBUG) _log.setLevel(logging.DEBUG)
@ -94,8 +93,6 @@ def process_video(proc_state):
# if we can skip it # if we can skip it
if skip_transcode(metadata): if skip_transcode(metadata):
_log.debug('Skipping transcoding') _log.debug('Skipping transcoding')
# Just push the submitted file to the tmp_dst
open(tmp_dst.name, 'wb').write(open(queued_filename, 'rb').read())
dst_dimensions = metadata['videowidth'], metadata['videoheight'] dst_dimensions = metadata['videowidth'], metadata['videoheight']