ffplay: use dummy video driver if display is disabled
Fixes ticket 1402. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
		
							parent
							
								
									8d1de449f0
								
							
						
					
					
						commit
						1372c826de
					
				
							
								
								
									
										3
									
								
								ffplay.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								ffplay.c
									
									
									
									
									
								
							@ -3060,6 +3060,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    int flags;
 | 
					    int flags;
 | 
				
			||||||
    VideoState *is;
 | 
					    VideoState *is;
 | 
				
			||||||
 | 
					    char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    av_log_set_flags(AV_LOG_SKIP_REPEATED);
 | 
					    av_log_set_flags(AV_LOG_SKIP_REPEATED);
 | 
				
			||||||
    parse_loglevel(argc, argv, options);
 | 
					    parse_loglevel(argc, argv, options);
 | 
				
			||||||
@ -3097,6 +3098,8 @@ int main(int argc, char **argv)
 | 
				
			|||||||
    flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
 | 
					    flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
 | 
				
			||||||
    if (audio_disable)
 | 
					    if (audio_disable)
 | 
				
			||||||
        flags &= ~SDL_INIT_AUDIO;
 | 
					        flags &= ~SDL_INIT_AUDIO;
 | 
				
			||||||
 | 
					    if (display_disable)
 | 
				
			||||||
 | 
					        SDL_putenv(dummy_videodriver); /* For the event queue, we always need a video driver. */
 | 
				
			||||||
#if !defined(__MINGW32__) && !defined(__APPLE__)
 | 
					#if !defined(__MINGW32__) && !defined(__APPLE__)
 | 
				
			||||||
    flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
 | 
					    flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user