# HG changeset patch # User bcoudurier # Date 1168737624 0 # Node ID 4740223bfd8e1c57774448e94bfae71968ef9178 # Parent 0c6b7ac24cd72c8dceaf84ae5a0eb7cefb4e43e8 simplify diff -r 0c6b7ac24cd7 -r 4740223bfd8e swf.c --- a/swf.c Sun Jan 14 01:14:31 2007 +0000 +++ b/swf.c Sun Jan 14 01:20:24 2007 +0000 @@ -855,17 +855,17 @@ return AVERROR_IO; if (tag == TAG_VIDEOFRAME) { int ch_id = get_le16(pb); + len -= 2; for( i=0; inb_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 @@ pkt->stream_index = st->index; return pkt->size; } - url_fskip(pb, len); - } else { - url_fskip(pb, len); } + url_fskip(pb, len); } return 0; }