mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	gstpipewiresrc: Set stream error on caps negotiation failure
In order to make `wait_started()` error out accordingly, which otherwise blocks `change_state()` until the timeout is over.
This commit is contained in:
		
							parent
							
								
									eb797cac48
								
							
						
					
					
						commit
						06bad5523d
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -944,18 +944,26 @@ no_nego_needed:
 | 
			
		|||
  }
 | 
			
		||||
no_caps:
 | 
			
		||||
  {
 | 
			
		||||
    const gchar * error_string = "No supported formats found";
 | 
			
		||||
 | 
			
		||||
    GST_ELEMENT_ERROR (basesrc, STREAM, FORMAT,
 | 
			
		||||
        ("No supported formats found"),
 | 
			
		||||
        ("%s", error_string),
 | 
			
		||||
        ("This element did not produce valid caps"));
 | 
			
		||||
    pw_stream_set_error (pwsrc->stream, -EINVAL, "%s", error_string);
 | 
			
		||||
 | 
			
		||||
    if (thiscaps)
 | 
			
		||||
      gst_caps_unref (thiscaps);
 | 
			
		||||
    return FALSE;
 | 
			
		||||
  }
 | 
			
		||||
no_common_caps:
 | 
			
		||||
  {
 | 
			
		||||
    const gchar * error_string = "No supported formats found";
 | 
			
		||||
 | 
			
		||||
    GST_ELEMENT_ERROR (basesrc, STREAM, FORMAT,
 | 
			
		||||
        ("No supported formats found"),
 | 
			
		||||
        ("%s", error_string),
 | 
			
		||||
        ("This element does not have formats in common with the peer"));
 | 
			
		||||
    pw_stream_set_error (pwsrc->stream, -EPIPE, "%s", error_string);
 | 
			
		||||
 | 
			
		||||
    if (caps)
 | 
			
		||||
      gst_caps_unref (caps);
 | 
			
		||||
    return FALSE;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue