rtpdec_xiph: Handle the sampling SDP parameter
Patch by Josh Allmann, joshua dot allmann at gmail Originally committed as revision 24565 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
							parent
							
								
									f8a169ac8e
								
							
						
					
					
						commit
						42c63263d1
					
				@ -293,7 +293,17 @@ static int xiph_parse_fmtp_pair(AVStream* stream,
 | 
				
			|||||||
    int result = 0;
 | 
					    int result = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!strcmp(attr, "sampling")) {
 | 
					    if (!strcmp(attr, "sampling")) {
 | 
				
			||||||
        return AVERROR_PATCHWELCOME;
 | 
					        if (!strcmp(value, "YCbCr-4:2:0")) {
 | 
				
			||||||
 | 
					            codec->pix_fmt = PIX_FMT_YUV420P;
 | 
				
			||||||
 | 
					        } else if (!strcmp(value, "YCbCr-4:4:2")) {
 | 
				
			||||||
 | 
					            codec->pix_fmt = PIX_FMT_YUV422P;
 | 
				
			||||||
 | 
					        } else if (!strcmp(value, "YCbCr-4:4:4")) {
 | 
				
			||||||
 | 
					            codec->pix_fmt = PIX_FMT_YUV444P;
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            av_log(codec, AV_LOG_ERROR,
 | 
				
			||||||
 | 
					                   "Unsupported pixel format %s\n", attr);
 | 
				
			||||||
 | 
					            return AVERROR_INVALIDDATA;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    } else if (!strcmp(attr, "width")) {
 | 
					    } else if (!strcmp(attr, "width")) {
 | 
				
			||||||
        /* This is an integer between 1 and 1048561
 | 
					        /* This is an integer between 1 and 1048561
 | 
				
			||||||
         * and MUST be in multiples of 16. */
 | 
					         * and MUST be in multiples of 16. */
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user