MediaLibrary: Only create the device when it is unknown

(cherry picked from commit 0488ed41)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
9 jobs for 0.4.x in 17 minutes and 58 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #259851
amd64 debian
build:linux

00:02:32

passed #259852
win32
build:win32

00:02:40

passed #259853
win64
build:win64

00:02:43

 
  Unit Tests
passed #259854
amd64 debian
unit-tests:linux

00:03:37

passed #259855
win32
unit-tests:win32

00:04:31

passed #259856
win64
unit-tests:win64

00:04:41

 
  Functional Tests
passed #259857
amd64 debian
functional-tests:linux

00:03:25

passed #259858
win32
functional-tests:win32

00:03:06

failed #259859
win64
functional-tests:win64

00:02:56

 
Name Stage Failure
failed
functional-tests:win64 Functional Tests
[  PASSED  ] 59 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] SamplesTests/Tests.Parse/17, where GetParam() = "playlist_same_folder"

1 FAILED TEST
[swscaler @ 000000002ece9680] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000002eded3c0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000002ee70ec0] deprecated pixel format used, make sure you did set range correctly
ERROR: Job failed: exit code 1