Do not read from prior the array, fix CID 127.
Originally committed as revision 13471 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
							parent
							
								
									406a0fdcab
								
							
						
					
					
						commit
						8e6f8869ab
					
				@ -407,16 +407,16 @@ enum PixelFormat avcodec_get_pix_fmt(const char* name)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void avcodec_pix_fmt_string (char *buf, int buf_size, int pix_fmt)
 | 
					void avcodec_pix_fmt_string (char *buf, int buf_size, int pix_fmt)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    PixFmtInfo info= pix_fmt_info[pix_fmt];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    char is_alpha_char= info.is_alpha ? 'y' : 'n';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* print header */
 | 
					    /* print header */
 | 
				
			||||||
    if (pix_fmt < 0)
 | 
					    if (pix_fmt < 0)
 | 
				
			||||||
        snprintf (buf, buf_size,
 | 
					        snprintf (buf, buf_size,
 | 
				
			||||||
                  "name      " " nb_channels" " depth" " is_alpha"
 | 
					                  "name      " " nb_channels" " depth" " is_alpha"
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
    else
 | 
					    else{
 | 
				
			||||||
 | 
					        PixFmtInfo info= pix_fmt_info[pix_fmt];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        char is_alpha_char= info.is_alpha ? 'y' : 'n';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        snprintf (buf, buf_size,
 | 
					        snprintf (buf, buf_size,
 | 
				
			||||||
                  "%-10s" "      %1d     " "   %2d " "     %c   ",
 | 
					                  "%-10s" "      %1d     " "   %2d " "     %c   ",
 | 
				
			||||||
                  info.name,
 | 
					                  info.name,
 | 
				
			||||||
@ -424,6 +424,7 @@ void avcodec_pix_fmt_string (char *buf, int buf_size, int pix_fmt)
 | 
				
			|||||||
                  info.depth,
 | 
					                  info.depth,
 | 
				
			||||||
                  is_alpha_char
 | 
					                  is_alpha_char
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ff_fill_linesize(AVPicture *picture, int pix_fmt, int width)
 | 
					int ff_fill_linesize(AVPicture *picture, int pix_fmt, int width)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user