~ubuntu-branches/ubuntu/precise/mplayer2/precise-proposed

« back to all changes in this revision

Viewing changes to ffmpeg-mt/libavformat/seek.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-04-21 09:21:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110421092139-7a21foqroxvir3wr
Tags: 2.0-54-gd33877a-1
* New upstream version
* Bug fix: "internal MP3 decoder miscompiles with gcc 4.6", thanks to
  Norbert Preining (Closes: #623279). Fixed by no longer using internal
  mp3lib copy.
* drop build host specific optimizations

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * Copyright (c) 2009 Ivan Schreter
5
5
 *
6
 
 * This file is part of FFmpeg.
 
6
 * This file is part of Libav.
7
7
 *
8
 
 * FFmpeg is free software; you can redistribute it and/or
 
8
 * Libav is free software; you can redistribute it and/or
9
9
 * modify it under the terms of the GNU Lesser General Public
10
10
 * License as published by the Free Software Foundation; either
11
11
 * version 2.1 of the License, or (at your option) any later version.
12
12
 *
13
 
 * FFmpeg is distributed in the hope that it will be useful,
 
13
 * Libav is distributed in the hope that it will be useful,
14
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
16
 * Lesser General Public License for more details.
17
17
 *
18
18
 * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with FFmpeg; if not, write to the Free Software
 
19
 * License along with Libav; if not, write to the Free Software
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
313
313
    step = s->pb->buffer_size;
314
314
    curpos = FFMAX(pos - step / 2, 0);
315
315
    for (;;) {
316
 
        url_fseek(s->pb, curpos, SEEK_SET);
 
316
        avio_seek(s->pb, curpos, SEEK_SET);
317
317
        search_hi_lo_keyframes(s,
318
318
                               ts, time_base,
319
319
                               flags,
385
385
        }
386
386
    }
387
387
 
388
 
    url_fseek(s->pb, pos, SEEK_SET);
 
388
    avio_seek(s->pb, pos, SEEK_SET);
389
389
    av_free(sync);
390
390
    return pos;
391
391
}
405
405
        return NULL;
406
406
    }
407
407
 
408
 
    state->fpos = url_ftell(s->pb);
 
408
    state->fpos = avio_tell(s->pb);
409
409
 
410
410
    // copy context structures
411
411
    state->cur_st                           = s->cur_st;
456
456
    if (!state)
457
457
        return;
458
458
 
459
 
    url_fseek(s->pb, state->fpos, SEEK_SET);
 
459
    avio_seek(s->pb, state->fpos, SEEK_SET);
460
460
 
461
461
    // copy context structures
462
462
    s->cur_st                           = state->cur_st;