mirror of
				https://git.ffmpeg.org/ffmpeg.git
				synced 2025-11-04 01:30:56 +00:00 
			
		
		
		
	rtp: Fix ff_rtp_get_payload_type
It was broken in 3b3ea34655
"Remove all uses of deprecated AVOptions API", where any
presence of a payload_type AVOption caused its value to
be returned, even if it wasn't set (and thus had the default
-1 value).
This caused the RTP muxer to be broken.
Signed-off-by: Martin Storsjö <martin@martin.st>
			
			
This commit is contained in:
		
							parent
							
								
									02a1a28c61
								
							
						
					
					
						commit
						2e69dd66b6
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -98,7 +98,8 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec)
 | 
			
		|||
    /* Was the payload type already specified for the RTP muxer? */
 | 
			
		||||
    if (ofmt && ofmt->priv_class) {
 | 
			
		||||
        int64_t payload_type;
 | 
			
		||||
        if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0)
 | 
			
		||||
        if (av_opt_get_int(fmt->priv_data, "payload_type", 0, &payload_type) >= 0 &&
 | 
			
		||||
            payload_type >= 0)
 | 
			
		||||
            return (int)payload_type;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue