diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-09 11:35:59 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-09 11:35:59 +0000 |
commit | fb2e95c97a0094fc981ac07485ff44297e61e5c7 (patch) | |
tree | bb2d61b36dda9363474790e0abeca2cf9c2b9c03 /libavformat | |
parent | 082dea8e404ea30c7ece089cf7cd81c38c3916c4 (diff) | |
download | ffmpeg-fb2e95c97a0094fc981ac07485ff44297e61e5c7.tar.gz |
Set AVPacket pos also for audio packets in nuv demuxer.
Originally committed as revision 17904 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/nuv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c index fed0d69777..103223ee83 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -197,6 +197,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { int ret, size; while (!url_feof(pb)) { int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0; + uint64_t pos = url_ftell(pb); ret = get_buffer(pb, hdr, HDRSIZE); if (ret <= 0) return ret ? ret : -1; @@ -217,7 +218,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { ret = av_new_packet(pkt, copyhdrsize + size); if (ret < 0) return ret; - pkt->pos = url_ftell(pb) - copyhdrsize; + pkt->pos = pos; pkt->pts = AV_RL32(&hdr[4]); pkt->stream_index = ctx->v_id; memcpy(pkt->data, hdr, copyhdrsize); @@ -230,6 +231,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { break; } ret = av_get_packet(pb, pkt, size); + pkt->pos = pos; pkt->pts = AV_RL32(&hdr[4]); pkt->stream_index = ctx->a_id; return ret; |