| 
														
															@@ -4317,14 +4317,18 @@ namespace MediaBrowser.Controller.MediaEncoding 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         protected string GetHardwareVideoDecoder(EncodingJobInfo state, EncodingOptions options) 
														 | 
														
														 | 
														
															         protected string GetHardwareVideoDecoder(EncodingJobInfo state, EncodingOptions options) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         { 
														 | 
														
														 | 
														
															         { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             var videoStream = state.VideoStream; 
														 | 
														
														 | 
														
															             var videoStream = state.VideoStream; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (videoStream == null) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            var mediaSource = state.MediaSource; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (videoStream == null || mediaSource == null) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             { 
														 | 
														
														 | 
														
															             { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return null; 
														 | 
														
														 | 
														
															                 return null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            // Only use alternative encoders for video files. 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            var videoType = state.MediaSource.VideoType ?? VideoType.VideoFile; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (videoType != VideoType.VideoFile) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            // HWA decoders can handle both video files and video folders. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            var videoType = mediaSource.VideoType; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (videoType != VideoType.VideoFile 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                && videoType != VideoType.Iso 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                && videoType != VideoType.Dvd 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                && videoType != VideoType.BluRay) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             { 
														 | 
														
														 | 
														
															             { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return null; 
														 | 
														
														 | 
														
															                 return null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 |