[FFmpeg-cvslog] wtv: Drop some casts that now are unnecessary
Martin Storsjö
git at videolan.org
Sat Jul 27 09:52:39 CEST 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Jul 26 21:50:40 2013 +0300| [979e9e8f3671d49463fd309dcd3d9c445a4c63de] | committer: Martin Storsjö
wtv: Drop some casts that now are unnecessary
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=979e9e8f3671d49463fd309dcd3d9c445a4c63de
---
libavformat/wtv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index d7f85a7..b003905 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -94,7 +94,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;
}
@@ -119,7 +119,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;
@@ -191,7 +191,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);
}
@@ -218,7 +218,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;
More information about the ffmpeg-cvslog
mailing list