diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-13 22:26:45 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-13 22:26:45 +0000 |
commit | 7e04cfba27a6d7ab6d142242fb76d1d243707a66 (patch) | |
tree | 8f7471987bf0ef772e747cc8bd3975cb3478d82f /libavformat/swfdec.c | |
parent | 4e35ffa978a95855854301c36f8fd94ac69b646a (diff) | |
download | ffmpeg-7e04cfba27a6d7ab6d142242fb76d1d243707a66.tar.gz |
Set pkt->pos correctly (to the start of header of the packet) in swfdec.
Originally committed as revision 17953 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/swfdec.c')
-rw-r--r-- | libavformat/swfdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 84510eedcd..1f010c58be 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -87,6 +87,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) 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 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) 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 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) } else { // ADPCM, PCM av_get_packet(pb, pkt, len); } + pkt->pos = pos; pkt->stream_index = st->index; return pkt->size; } @@ -195,6 +198,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) } else { get_buffer(pb, pkt->data + 4, pkt->size - 4); } + pkt->pos = pos; pkt->stream_index = st->index; return pkt->size; } |