mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
lavf: ffio_limit(), treat avio_size()==0 as error.
This works around issues arising from inputs that claim to have a
filesize of 0.
Reported-by: buzz_
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e6362f3a3c
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0bf48d24d7
commit
4ae111cf71
@ -271,7 +271,7 @@ int ffio_limit(AVIOContext *s, int size)
|
||||
if(remaining < size){
|
||||
int64_t newsize= avio_size(s);
|
||||
if(!s->maxsize || s->maxsize<newsize)
|
||||
s->maxsize= newsize;
|
||||
s->maxsize= newsize - !newsize;
|
||||
remaining= s->maxsize - avio_tell(s);
|
||||
remaining= FFMAX(remaining, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user