Commit 25051bd2 authored by bcoudurier's avatar bcoudurier

simplify

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7457 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1bff5c27
...@@ -855,17 +855,17 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -855,17 +855,17 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_IO; return AVERROR_IO;
if (tag == TAG_VIDEOFRAME) { if (tag == TAG_VIDEOFRAME) {
int ch_id = get_le16(pb); int ch_id = get_le16(pb);
len -= 2;
for( i=0; i<s->nb_streams; i++ ) { for( i=0; i<s->nb_streams; i++ ) {
st = s->streams[i]; st = s->streams[i];
if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) { if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) {
frame = get_le16(pb); 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->pts = frame * swf->ms_per_frame;
pkt->stream_index = st->index; pkt->stream_index = st->index;
return pkt->size; return pkt->size;
} }
} }
url_fskip(pb, len-2);
} else if (tag == TAG_STREAMBLOCK) { } else if (tag == TAG_STREAMBLOCK) {
st = s->streams[swf->audio_stream_index]; st = s->streams[swf->audio_stream_index];
if (st->codec->codec_id == CODEC_ID_MP3) { if (st->codec->codec_id == CODEC_ID_MP3) {
...@@ -874,10 +874,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -874,10 +874,8 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->stream_index = st->index; pkt->stream_index = st->index;
return pkt->size; return pkt->size;
} }
url_fskip(pb, len);
} else {
url_fskip(pb, len);
} }
url_fskip(pb, len);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment