Changeset 559ae20d in ffmpeg


Ignore:
Timestamp:
Dec 16, 2011, 3:58:12 PM (13 years ago)
Author:
Michael Niedermayer <michaelni@gmx.at>
Branches:
master
Children:
207d9eab
Parents:
39f59a8d
git-author:
Michael Niedermayer <michaelni@gmx.at> (12/16/11 14:40:21)
git-committer:
Michael Niedermayer <michaelni@gmx.at> (12/16/11 15:58:12)
Message:

lavf: Update AVIOContext.maxsize when hitting the end.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libavformat/utils.c

    r39f59a8d r559ae20d  
    270270    int ret;
    271271
    272     if(s->maxsize>0){
     272    if(s->maxsize>=0){
    273273        int64_t remaining= s->maxsize - avio_tell(s);
    274         if(remaining>=0)
    275             size= FFMIN(size, remaining);
     274        if(remaining < size){
     275            int64_t newsize= avio_size(s);
     276            if(!s->maxsize || s->maxsize<newsize)
     277                s->maxsize= newsize;
     278            remaining= s->maxsize - avio_tell(s);
     279        }
     280
     281        if(s->maxsize>=0 && remaining>=0)
     282            size= FFMIN(size, remaining+1);
    276283    }
    277284
Note: See TracChangeset for help on using the changeset viewer.