if (tag == TAG_STREAMBLOCK) { av_new_packet(pkt, len); get_buffer(pb, pkt->data, pkt->size); break;
if (tag == TAG_VIDEOFRAME) { for( i=0; i<s->nb_streams; i++ ) { st = s->streams[i]; if (st->id == 0) { if ( get_le16(pb) == swf->ch_id ) { frame = get_le16(pb); av_new_packet(pkt, len-4); pkt->pts = frame * swf->ms_per_frame; pkt->stream_index = st->index; get_buffer(pb, pkt->data, pkt->size); return pkt->size; } else { url_fskip(pb, len-2); continue; } } } url_fskip(pb, len); } else if (tag == TAG_STREAMBLOCK) { for( i=0; i<s->nb_streams; i++ ) { st = s->streams[i]; if (st->id == 1) { av_new_packet(pkt, len); pkt->stream_index = st->index; get_buffer(pb, pkt->data, pkt->size); return pkt->size; } } url_fskip(pb, len);
static int swf_read_packet(AVFormatContext *s, AVPacket *pkt){    ByteIOContext *pb = &s->pb;    int tag, len;        for(;;) {        tag = get_swf_tag(pb, &len);        if (tag < 0)             return -EIO;        if (tag == TAG_STREAMBLOCK) {            av_new_packet(pkt, len);            get_buffer(pb, pkt->data, pkt->size);            break;        } else {            url_fskip(pb, len);        }    }    return 0;}