﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	parents
5065	skip_transcode never returns True	anongoblin		"In mediagoblin/media_types/video/util.py, skip_transcode

The return type of tags.get_string is a tuple, (bool, value) (ref https://lazka.github.io/pgi-docs/Gst-1.0/structs/TagList.html#Gst.TagList.get_string)
This code assumes that the return value is just a string. As such, it will always return False.

Example:

 39  	    if config['mime_types'] and tags.get_string('mimetype'):
 40  	        if not tags.get_string('mimetype') in config['mime_types']:
 41  	            return False

If there is no mimetype string in tags, then tags.get_string('mimetype') returns:
  (False, None)
Which allows the test on line 40 to pass. Of course, (False, None) does not appear in the list of mimetypes in the config.

In each case, the initial existence test needs a [0] after the get_string, and the second test needs a [1] after the get_string. E.g.:
 39  	    if config['mime_types'] and tags.get_string('mimetype')[0]:
 40  	        if not tags.get_string('mimetype')[1] in config['mime_types']:
 41  	            return False

(raised as anongoblin as registration is disabled)"	defect	closed	major	0.8.0	programming	fixed			
