Revision 94dfea71 libavformat/oggdec.c

View differences:

libavformat/oggdec.c
374 374
            os->segp = segp;
375 375
            os->psize = psize;
376 376

  
377
            // We have reached the first non-header packet. All header
378
            // packets must be complete before the first non-header
379
            // one, so everything that follows must be non-header.
377
            // We have reached the first non-header packet in this stream.
378
            // Unfortunately more header packets may still follow for others,
379
            // so we reset this later unless we are done with the headers
380
            // for all streams.
380 381
            ogg->headers = 1;
381 382

  
382 383
            // Update the header state for all streams and
383 384
            // compute the data_offset.
384
            s->data_offset = os->sync_pos;
385
            if (!s->data_offset)
386
                s->data_offset = os->sync_pos;
385 387
            for (i = 0; i < ogg->nstreams; i++) {
386 388
                struct ogg_stream *cur_os = ogg->streams + i;
387
                // Set stream header state to 0 if its last packet
388
                // was a header.
389 389
                if (cur_os->header > 0)
390
                    cur_os->header = 0;
390
                    ogg->headers = 0;
391 391

  
392 392
                // if we have a partial non-header packet, its start is
393 393
                // obviously at or after the data start

Also available in: Unified diff