Revision 8f3eebd6 libavformat/oggdec.c

View differences:

libavformat/oggdec.c
164 164
    os->bufsize = DECODER_BUFFER_SIZE;
165 165
    os->buf = av_malloc(os->bufsize);
166 166
    os->header = -1;
167
    os->page_begin = 1;
168 167

  
169 168
    st = av_new_stream (s, idx);
170 169
    if (!st)
......
242 241

  
243 242
    idx = ogg_find_stream (ogg, serial);
244 243
    if (idx < 0){
245
        for (i = 0; i < ogg->nstreams; i++) {
246
            if (!ogg->streams[i].page_begin) {
244
        if (ogg->headers) {
247 245
                int n;
248 246

  
249 247
                for (n = 0; n < ogg->nstreams; n++) {
......
252 250
                }
253 251
                ogg->curidx   = -1;
254 252
                ogg->nstreams = 0;
255
                break;
256
            }
257 253
        }
258 254
        idx = ogg_new_stream (s, serial);
259 255
        if (idx < 0)
......
261 257
    }
262 258

  
263 259
    os = ogg->streams + idx;
264
    if (!(flags & OGG_FLAG_BOS))
265
        os->page_begin = 0;
266 260
    os->page_pos = avio_tell(bc) - 27;
267 261

  
268 262
    if(os->psize > 0)

Also available in: Unified diff