# HG changeset patch # User reimar # Date 1236598559 0 # Node ID d12f0e989bd5fcb33146322cfb6e0f85c17d2b88 # Parent c12f591bf75096707204f9b6e46deb33193b1c6c Set AVPacket pos also for audio packets in nuv demuxer. diff -r c12f591bf750 -r d12f0e989bd5 nuv.c --- a/nuv.c Mon Mar 09 04:17:12 2009 +0000 +++ b/nuv.c Mon Mar 09 11:35:59 2009 +0000 @@ -197,6 +197,7 @@ 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 @@ 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 @@ 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;