mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-rtp-sap: Make sure we don't publish a null refclk
If the PTP refclk is not readable, we fallback to the stored ts_refclk, which might be NULL. Make sure we check for this case.
This commit is contained in:
		
							parent
							
								
									75b428ea55
								
							
						
					
					
						commit
						eb7be3331f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -753,10 +753,10 @@ static int send_sap(struct impl *impl, struct session *sess, bool bye)
 | 
				
			||||||
					impl->gm_id[6],
 | 
										impl->gm_id[6],
 | 
				
			||||||
					impl->gm_id[7],
 | 
										impl->gm_id[7],
 | 
				
			||||||
					0/* domain */);
 | 
										0/* domain */);
 | 
				
			||||||
		} else {
 | 
							} else if (sdp->ts_refclk != NULL) {
 | 
				
			||||||
			spa_strbuf_append(&buf,	"a=ts-refclk:%s\n",	sdp->ts_refclk);
 | 
								spa_strbuf_append(&buf, "a=ts-refclk:%s\n", sdp->ts_refclk);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		spa_strbuf_append(&buf,	"a=mediaclk:direct=%u\n",	sdp->ts_offset);
 | 
							spa_strbuf_append(&buf, "a=mediaclk:direct=%u\n", sdp->ts_offset);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		spa_strbuf_append(&buf, "a=mediaclk:sender\n");
 | 
							spa_strbuf_append(&buf, "a=mediaclk:sender\n");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue