libavformat/aviobuf: Forward error from avio_read in ffio_read_size()
Suggested-by: Andreas Rheinhardt Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
							parent
							
								
									441fd1bd7d
								
							
						
					
					
						commit
						66ca6d0fe8
					
				@ -686,9 +686,11 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size)
 | 
			
		||||
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
 | 
			
		||||
{
 | 
			
		||||
    int ret = avio_read(s, buf, size);
 | 
			
		||||
    if (ret != size)
 | 
			
		||||
        return AVERROR_INVALIDDATA;
 | 
			
		||||
    if (ret == size)
 | 
			
		||||
        return ret;
 | 
			
		||||
    if (ret < 0 && ret != AVERROR_EOF)
 | 
			
		||||
        return ret;
 | 
			
		||||
    return AVERROR_INVALIDDATA;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ffio_read_indirect(AVIOContext *s, unsigned char *buf, int size, const unsigned char **data)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user