Revision 8e287af0

View differences:

libavformat/avio.c
148 148
{
149 149
    offset_t pos, size;
150 150

  
151
    size= url_seek(h, 0, AVSEEK_SIZE);
152
    if(size<0){
151 153
    pos = url_seek(h, 0, SEEK_CUR);
152 154
    size = url_seek(h, -1, SEEK_END)+1;
153 155
    url_seek(h, pos, SEEK_SET);
156
    }
154 157
    return size;
155 158
}
156 159

  
libavformat/avio.h
69 69
/* not implemented */
70 70
int url_poll(URLPollEntry *poll_table, int n, int timeout);
71 71

  
72
#define AVSEEK_SIZE 0x10000
73

  
72 74
typedef struct URLProtocol {
73 75
    const char *name;
74 76
    int (*url_open)(URLContext *h, const char *filename, int flags);
libavformat/aviobuf.c
170 170

  
171 171
    if (!s->seek)
172 172
        return -EPIPE;
173
    size = s->seek(s->opaque, 0, AVSEEK_SIZE);
174
    if(size<0){
173 175
    size = s->seek(s->opaque, -1, SEEK_END) + 1;
174 176
    s->seek(s->opaque, s->pos, SEEK_SET);
177
    }
175 178
    return size;
176 179
}
177 180

  

Also available in: Unified diff