~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to libavformat/oggdec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
    ogg->state = ost->next;
93
93
 
94
94
    if (!discard){
 
95
        struct ogg_stream *old_streams = ogg->streams;
 
96
 
95
97
        for (i = 0; i < ogg->nstreams; i++)
96
98
            av_free (ogg->streams[i].buf);
97
99
 
98
100
        avio_seek (bc, ost->pos, SEEK_SET);
99
101
        ogg->curidx = ost->curidx;
100
102
        ogg->nstreams = ost->nstreams;
101
 
        memcpy(ogg->streams, ost->streams,
102
 
               ost->nstreams * sizeof(*ogg->streams));
 
103
        ogg->streams = av_realloc (ogg->streams,
 
104
                                   ogg->nstreams * sizeof (*ogg->streams));
 
105
 
 
106
        if (ogg->streams) {
 
107
            memcpy(ogg->streams, ost->streams,
 
108
                   ost->nstreams * sizeof(*ogg->streams));
 
109
        } else {
 
110
            av_free(old_streams);
 
111
            ogg->nstreams = 0;
 
112
        }
103
113
    }
104
114
 
105
115
    av_free (ost);