mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	gst: src: Set possible_caps before stream connect
The value is used when a the format changes in handle_format_change(), and while it seems this was typically expected to happen async and thus protected by the thread lock, there are cases (such as with auto-port-config) where a param might be set within the pw_stream_connect() call itself (in the case of auto-port-config, by the impl_init() of the audioadapter).
This commit is contained in:
		
							parent
							
								
									ff75f550ad
								
							
						
					
					
						commit
						85fa0aae40
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -955,6 +955,9 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
 | 
			
		|||
  GST_DEBUG_OBJECT (basesrc, "connect capture with path %s, target-object %s",
 | 
			
		||||
                    pwsrc->stream->path, pwsrc->stream->target_object);
 | 
			
		||||
 | 
			
		||||
  pwsrc->possible_caps = possible_caps;
 | 
			
		||||
  pwsrc->negotiated = FALSE;
 | 
			
		||||
 | 
			
		||||
  enum pw_stream_flags flags;
 | 
			
		||||
  flags = PW_STREAM_FLAG_DONT_RECONNECT |
 | 
			
		||||
	  PW_STREAM_FLAG_ASYNC;
 | 
			
		||||
| 
						 | 
				
			
			@ -970,9 +973,6 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
 | 
			
		|||
  pw_thread_loop_get_time (pwsrc->stream->core->loop, &abstime,
 | 
			
		||||
                  GST_PIPEWIRE_DEFAULT_TIMEOUT * SPA_NSEC_PER_SEC);
 | 
			
		||||
 | 
			
		||||
  pwsrc->possible_caps = possible_caps;
 | 
			
		||||
  pwsrc->negotiated = FALSE;
 | 
			
		||||
 | 
			
		||||
  while (TRUE) {
 | 
			
		||||
    enum pw_stream_state state = pw_stream_get_state (pwsrc->stream->pwstream, &error);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue