ffplay: Don't assume ic->pb is non-null
This fixes crashes on exit when plaing some RealRTSP streams (among other), e.g. rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3. These crashes have been present since 3e68b3ba7b015cf21. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
		
							parent
							
								
									eb1e7f78ea
								
							
						
					
					
						commit
						648c79624f
					
				
							
								
								
									
										4
									
								
								ffplay.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								ffplay.c
									
									
									
									
									
								
							@ -2568,9 +2568,9 @@ static int decode_thread(void *arg)
 | 
			
		||||
        }
 | 
			
		||||
        ret = av_read_frame(ic, pkt);
 | 
			
		||||
        if (ret < 0) {
 | 
			
		||||
            if (ret == AVERROR_EOF || ic->pb->eof_reached)
 | 
			
		||||
            if (ret == AVERROR_EOF || (ic->pb && ic->pb->eof_reached))
 | 
			
		||||
                eof=1;
 | 
			
		||||
            if (ic->pb->error)
 | 
			
		||||
            if (ic->pb && ic->pb->error)
 | 
			
		||||
                break;
 | 
			
		||||
            SDL_Delay(100); /* wait for user event */
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user