aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/electronicarts.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-15 09:14:38 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-16 22:24:51 -0400
commit45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8 (patch)
tree79beacdc9d6d90d0e31558526d83033200f4361d /libavformat/electronicarts.c
parentcbf5d22d24945e52b3c1e4c1a00d4d8179be930a (diff)
downloadffmpeg-45a8a02a4151c9ff0d1161bf90bffcfbbb312fb8.tar.gz
lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r--libavformat/electronicarts.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index a43cfc8d66..d4d0d553ba 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -222,7 +222,7 @@ static int process_audio_header_eacs(AVFormatContext *s)
ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */
ea->num_channels = avio_r8(pb);
compression_type = avio_r8(pb);
- avio_seek(pb, 13, SEEK_CUR);
+ avio_skip(pb, 13);
switch (compression_type) {
case 0:
@@ -261,7 +261,7 @@ static int process_video_header_mdec(AVFormatContext *s)
{
EaDemuxContext *ea = s->priv_data;
AVIOContext *pb = s->pb;
- avio_seek(pb, 4, SEEK_CUR);
+ avio_skip(pb, 4);
ea->width = avio_rl16(pb);
ea->height = avio_rl16(pb);
ea->time_base = (AVRational){1,15};
@@ -274,7 +274,7 @@ static int process_video_header_vp6(AVFormatContext *s)
EaDemuxContext *ea = s->priv_data;
AVIOContext *pb = s->pb;
- avio_seek(pb, 16, SEEK_CUR);
+ avio_skip(pb, 16);
ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb);
ea->video_codec = CODEC_ID_VP6;
@@ -316,7 +316,7 @@ static int process_ea_header(AVFormatContext *s) {
case SHEN_TAG :
blockid = avio_rl32(pb);
if (blockid == GSTR_TAG) {
- avio_seek(pb, 4, SEEK_CUR);
+ avio_skip(pb, 4);
} else if ((blockid & 0xFFFF)!=PT00_TAG) {
av_log (s, AV_LOG_ERROR, "unknown SCHl headerid\n");
return 0;
@@ -474,19 +474,19 @@ static int ea_read_packet(AVFormatContext *s,
/* audio data */
case ISNh_TAG:
/* header chunk also contains data; skip over the header portion*/
- avio_seek(pb, 32, SEEK_CUR);
+ avio_skip(pb, 32);
chunk_size -= 32;
case ISNd_TAG:
case SCDl_TAG:
case SNDC_TAG:
case SDEN_TAG:
if (!ea->audio_codec) {
- avio_seek(pb, chunk_size, SEEK_CUR);
+ avio_skip(pb, chunk_size);
break;
} else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||
ea->audio_codec == CODEC_ID_MP3) {
num_samples = avio_rl32(pb);
- avio_seek(pb, 8, SEEK_CUR);
+ avio_skip(pb, 8);
chunk_size -= 12;
}
ret = av_get_packet(pb, pkt, chunk_size);
@@ -541,7 +541,7 @@ static int ea_read_packet(AVFormatContext *s,
goto get_video_packet;
case mTCD_TAG:
- avio_seek(pb, 8, SEEK_CUR); // skip ea dct header
+ avio_skip(pb, 8); // skip ea dct header
chunk_size -= 8;
goto get_video_packet;
@@ -560,7 +560,7 @@ get_video_packet:
break;
default:
- avio_seek(pb, chunk_size, SEEK_CUR);
+ avio_skip(pb, chunk_size);
break;
}
}