mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:

committed by
Ronald S. Bultje

parent
cbf5d22d24
commit
45a8a02a41
@ -101,7 +101,7 @@ static int wc3_read_header(AVFormatContext *s,
|
||||
wc3->vpkt.data = NULL; wc3->vpkt.size = 0;
|
||||
|
||||
/* skip the first 3 32-bit numbers */
|
||||
avio_seek(pb, 12, SEEK_CUR);
|
||||
avio_skip(pb, 12);
|
||||
|
||||
/* traverse through the chunks and load the header information before
|
||||
* the first BRCH tag */
|
||||
@ -114,12 +114,12 @@ static int wc3_read_header(AVFormatContext *s,
|
||||
case SOND_TAG:
|
||||
case INDX_TAG:
|
||||
/* SOND unknown, INDX unnecessary; ignore both */
|
||||
avio_seek(pb, size, SEEK_CUR);
|
||||
avio_skip(pb, size);
|
||||
break;
|
||||
|
||||
case PC__TAG:
|
||||
/* number of palettes, unneeded */
|
||||
avio_seek(pb, 12, SEEK_CUR);
|
||||
avio_skip(pb, 12);
|
||||
break;
|
||||
|
||||
case BNAM_TAG:
|
||||
@ -240,7 +240,7 @@ static int wc3_read_packet(AVFormatContext *s,
|
||||
case TEXT_TAG:
|
||||
/* subtitle chunk */
|
||||
#if 0
|
||||
avio_seek(pb, size, SEEK_CUR);
|
||||
avio_skip(pb, size);
|
||||
#else
|
||||
if ((unsigned)size > sizeof(text) || (ret = avio_read(pb, text, size)) != size)
|
||||
ret = AVERROR(EIO);
|
||||
|
Reference in New Issue
Block a user