diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-27 09:43:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-27 09:43:29 +0200 |
commit | e8023dbaf0db494f9676a251cb05792dbf3758be (patch) | |
tree | 2b53d4e4e3cc0118935c2d67a892fe41ab9a616b /libavformat/wtvdec.c | |
parent | 90279285227914dabf2cd011b186d2182291363a (diff) | |
parent | 979e9e8f3671d49463fd309dcd3d9c445a4c63de (diff) | |
download | ffmpeg-e8023dbaf0db494f9676a251cb05792dbf3758be.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
wtv: Drop some casts that now are unnecessary
Conflicts:
libavformat/wtv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r-- | libavformat/wtvdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 62ea908f9f..551242d8a1 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -88,7 +88,7 @@ static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size) int i = wf->position >> wf->sector_bits; if (i >= wf->nb_sectors || (wf->sectors[i] != wf->sectors[i - 1] + (1 << (wf->sector_bits - WTV_SECTOR_BITS)) && - avio_seek(pb, (int64_t)wf->sectors[i] << WTV_SECTOR_BITS, SEEK_SET) < 0)) { + avio_seek(pb, wf->sectors[i] << WTV_SECTOR_BITS, SEEK_SET) < 0)) { wf->error = 1; break; } @@ -113,7 +113,7 @@ static int64_t wtvfile_seek(void *opaque, int64_t offset, int whence) offset = wf->length; wf->error = offset < 0 || offset >= wf->length || - avio_seek(pb, ((int64_t)wf->sectors[offset >> wf->sector_bits] << WTV_SECTOR_BITS) + avio_seek(pb, (wf->sectors[offset >> wf->sector_bits] << WTV_SECTOR_BITS) + (offset & ((1 << wf->sector_bits) - 1)), SEEK_SET) < 0; wf->position = offset; return offset; @@ -183,7 +183,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int } wf->nb_sectors = 0; for (i = 0; i < nb_sectors1; i++) { - if (avio_seek(s->pb, (int64_t)sectors1[i] << WTV_SECTOR_BITS, SEEK_SET) < 0) + if (avio_seek(s->pb, sectors1[i] << WTV_SECTOR_BITS, SEEK_SET) < 0) break; wf->nb_sectors += read_ints(s->pb, wf->sectors + i * WTV_SECTOR_SIZE / 4, WTV_SECTOR_SIZE / 4); } @@ -213,7 +213,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int /* seek to initial sector */ wf->position = 0; - if (avio_seek(s->pb, (int64_t)wf->sectors[0] << WTV_SECTOR_BITS, SEEK_SET) < 0) { + if (avio_seek(s->pb, wf->sectors[0] << WTV_SECTOR_BITS, SEEK_SET) < 0) { av_free(wf->sectors); av_free(wf); return NULL; |