Fix for issue 5070 gst incomplete file
Seek tmp_media_file to 0 before attempting to discover the file type. This prevents the following error when discovering mp4 video files. "gst-stream-error-quark: This file is incomplete and cannot be played"
This commit is contained in:
parent
17eb7786b6
commit
ba6d2d7e78
@ -146,6 +146,7 @@ def sniff_media(media_file, filename):
|
||||
tmp_media_file = tempfile.NamedTemporaryFile()
|
||||
shutil.copyfileobj(media_file, tmp_media_file)
|
||||
media_file.seek(0)
|
||||
tmp_media_file.seek(0)
|
||||
try:
|
||||
return type_match_handler(tmp_media_file, filename)
|
||||
except TypeNotFound as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user