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
274274 if(remaining < size){
275275 int64_t newsize= avio_size(s);
276276 if(!s->maxsize || s->maxsize<newsize)
277− s->maxsize= newsize;
277+ s->maxsize= newsize - !newsize;
278278 remaining= s->maxsize - avio_tell(s);
279279 remaining= FFMAX(remaining, 0);
280280 }

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