Mercurial > libavformat.hg
changeset 4707:f153437e1ac0 libavformat
Set pkt->pos correctly (to the start of header of the packet) in swfdec.
author | reimar |
---|---|
date | Fri, 13 Mar 2009 22:26:45 +0000 |
parents | a3f213a1d3a8 |
children | 87fbbc835a17 |
files | swfdec.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/swfdec.c Fri Mar 13 19:37:05 2009 +0000 +++ b/swfdec.c Fri Mar 13 22:26:45 2009 +0000 @@ -87,6 +87,7 @@ int tag, len, i, frame, v; for(;;) { + uint64_t pos = url_ftell(pb); tag = get_swf_tag(pb, &len); if (tag < 0) return AVERROR(EIO); @@ -148,6 +149,7 @@ if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) { frame = get_le16(pb); av_get_packet(pb, pkt, len-2); + pkt->pos = pos; pkt->pts = frame; pkt->stream_index = st->index; return pkt->size; @@ -163,6 +165,7 @@ } else { // ADPCM, PCM av_get_packet(pb, pkt, len); } + pkt->pos = pos; pkt->stream_index = st->index; return pkt->size; } @@ -195,6 +198,7 @@ } else { get_buffer(pb, pkt->data + 4, pkt->size - 4); } + pkt->pos = pos; pkt->stream_index = st->index; return pkt->size; }