X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fiff.c;h=dd69ce8ca5c96a3e8e2796f6eec1bd854888cf6c;hb=89e568feeca69b1e4b975d0b26aeafbe72fd5418;hp=15327c242140adbb9d7b314a0414e6fbe0d77577;hpb=b7effd4e8338f6ed5bda630ad7ed0809bf458648;p=ffmpeg diff --git a/libavformat/iff.c b/libavformat/iff.c index 15327c24214..dd69ce8ca5c 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -134,7 +134,7 @@ static int iff_read_header(AVFormatContext *s, return AVERROR(ENOMEM); st->codec->channels = 1; - url_fskip(pb, 8); + avio_seek(pb, 8, SEEK_CUR); // codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content st->codec->codec_tag = avio_rl32(pb); @@ -144,7 +144,7 @@ static int iff_read_header(AVFormatContext *s, const char *metadata_tag = NULL; chunk_id = avio_rl32(pb); data_size = avio_rb32(pb); - orig_pos = url_ftell(pb); + orig_pos = avio_tell(pb); switch(chunk_id) { case ID_VHDR: @@ -152,16 +152,16 @@ static int iff_read_header(AVFormatContext *s, if (data_size < 14) return AVERROR_INVALIDDATA; - url_fskip(pb, 12); + avio_seek(pb, 12, SEEK_CUR); st->codec->sample_rate = avio_rb16(pb); if (data_size >= 16) { - url_fskip(pb, 1); + avio_seek(pb, 1, SEEK_CUR); compression = avio_r8(pb); } break; case ID_BODY: - iff->body_pos = url_ftell(pb); + iff->body_pos = avio_tell(pb); iff->body_size = data_size; break; @@ -186,14 +186,14 @@ static int iff_read_header(AVFormatContext *s, return AVERROR_INVALIDDATA; st->codec->width = avio_rb16(pb); st->codec->height = avio_rb16(pb); - url_fskip(pb, 4); // x, y offset + avio_seek(pb, 4, SEEK_CUR); // x, y offset st->codec->bits_per_coded_sample = avio_r8(pb); if (data_size >= 11) { - url_fskip(pb, 1); // masking + avio_seek(pb, 1, SEEK_CUR); // masking compression = avio_r8(pb); } if (data_size >= 16) { - url_fskip(pb, 3); // paddding, transparent + avio_seek(pb, 3, SEEK_CUR); // paddding, transparent st->sample_aspect_ratio.num = avio_r8(pb); st->sample_aspect_ratio.den = avio_r8(pb); } @@ -223,10 +223,10 @@ static int iff_read_header(AVFormatContext *s, return res; } } - url_fskip(pb, data_size - (url_ftell(pb) - orig_pos) + (data_size & 1)); + avio_seek(pb, data_size - (avio_tell(pb) - orig_pos) + (data_size & 1), SEEK_CUR); } - url_fseek(pb, iff->body_pos, SEEK_SET); + avio_seek(pb, iff->body_pos, SEEK_SET); switch(st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: