diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-01-14 01:20:24 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-01-14 01:20:24 +0000 |
commit | 655254f0017d423fe74b945bdfb7296c990dec32 (patch) | |
tree | 006dc39a23fcdb10b8cc546a6072397f4636cdee | |
parent | 5b1e5dce35dfac3b89dddca851a0ffdeae4b9c20 (diff) | |
download | ffmpeg-655254f0017d423fe74b945bdfb7296c990dec32.tar.gz |
simplify
Originally committed as revision 7457 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/swf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/swf.c b/libavformat/swf.c index 149406daa8..f8b7c2675d 100644 --- a/libavformat/swf.c +++ b/libavformat/swf.c @@ -855,17 +855,17 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_IO; if (tag == TAG_VIDEOFRAME) { int ch_id = get_le16(pb); + len -= 2; for( i=0; i<s->nb_streams; i++ ) { st = s->streams[i]; if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) { frame = get_le16(pb); - av_get_packet(pb, pkt, len-4); + av_get_packet(pb, pkt, len-2); pkt->pts = frame * swf->ms_per_frame; pkt->stream_index = st->index; return pkt->size; } } - url_fskip(pb, len-2); } else if (tag == TAG_STREAMBLOCK) { st = s->streams[swf->audio_stream_index]; if (st->codec->codec_id == CODEC_ID_MP3) { @@ -874,10 +874,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = st->index; return pkt->size; } - url_fskip(pb, len); - } else { - url_fskip(pb, len); } + url_fskip(pb, len); } return 0; } |