diff options
author | Sebastian Vater <cdgs.basty@googlemail.com> | 2010-05-09 20:10:48 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-05-09 20:10:48 +0000 |
commit | 0613ece542421ddcbd061f355ad50ad9f2bb734a (patch) | |
tree | 6a067db9261123f34f3a835b239d7733e75ba603 | |
parent | 9d45a32ba8933cdf2c63ddf4d2126d497770fa9c (diff) | |
download | ffmpeg-0613ece542421ddcbd061f355ad50ad9f2bb734a.tar.gz |
Replace usage of s->streams[0]->* with st->*, which is shorter.
Patch by Sebastian Vater <cdgs basty googlemail com>.
Originally committed as revision 23069 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/iff.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index 7e3f3ad33b..5087c2bf33 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -290,7 +290,7 @@ static int iff_read_packet(AVFormatContext *s, if(iff->sent_bytes >= iff->body_size) return AVERROR(EIO); - if(s->streams[0]->codec->channels == 2) { + if(st->codec->channels == 2) { uint8_t sample_buffer[PACKET_SIZE]; ret = get_buffer(pb, sample_buffer, PACKET_SIZE); @@ -299,7 +299,7 @@ static int iff_read_packet(AVFormatContext *s, return AVERROR(ENOMEM); } interleave_stereo(sample_buffer, pkt->data, PACKET_SIZE); - } else if (s->streams[0]->codec->codec_id == CODEC_ID_RAWVIDEO) { + } else if (st->codec->codec_id == CODEC_ID_RAWVIDEO) { if(av_new_packet(pkt, iff->body_size + AVPALETTE_SIZE) < 0) { return AVERROR(ENOMEM); } @@ -311,7 +311,7 @@ static int iff_read_packet(AVFormatContext *s, st->codec->extradata_size = 0; ret = get_buffer(pb, pkt->data, iff->body_size); - } else if (s->streams[0]->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + } else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { ret = av_get_packet(pb, pkt, iff->body_size); } else { ret = av_get_packet(pb, pkt, PACKET_SIZE); @@ -320,15 +320,15 @@ static int iff_read_packet(AVFormatContext *s, if(iff->sent_bytes == 0) pkt->flags |= AV_PKT_FLAG_KEY; - if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { + if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { iff->sent_bytes += PACKET_SIZE; } else { iff->sent_bytes = iff->body_size; } pkt->stream_index = 0; - if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { + if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { pkt->pts = iff->audio_frame_count; - iff->audio_frame_count += ret / s->streams[0]->codec->channels; + iff->audio_frame_count += ret / st->codec->channels; } return ret; } |