History

lavf: ffio_limit(), treat avio_size()==0 as error.

This works around issues arising from inputs that claim to have a filesize of 0.

Michael Niedermayer committed 14 years ago

Commit e6362f31 parent 81980bf1 file · +1 −1Browse files

Unified · Split

libavformat/utils.c+1−1
@@ -274,7 +274,7 @@ int ffio_limit(AVIOContext *s, int size) · 273 unmodified lines
274 if(remaining < size){274 if(remaining < size){
275 int64_t newsize= avio_size(s);275 int64_t newsize= avio_size(s);
276 if(!s->maxsize || s->maxsize<newsize)276 if(!s->maxsize || s->maxsize<newsize)
277 s->maxsize= newsize;277 s->maxsize= newsize - !newsize;
278 remaining= s->maxsize - avio_tell(s);278 remaining= s->maxsize - avio_tell(s);
279 remaining= FFMAX(remaining, 0);279 remaining= FFMAX(remaining, 0);
280 }280 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t