[FFmpeg-cvslog] r17904 - trunk/libavformat/nuv.c
reimar
subversion
Mon Mar 9 12:35:59 CET 2009
Author: reimar
Date: Mon Mar 9 12:35:59 2009
New Revision: 17904
Log:
Set AVPacket pos also for audio packets in nuv demuxer.
Modified:
trunk/libavformat/nuv.c
Modified: trunk/libavformat/nuv.c
==============================================================================
--- trunk/libavformat/nuv.c Mon Mar 9 11:24:47 2009 (r17903)
+++ trunk/libavformat/nuv.c Mon Mar 9 12:35:59 2009 (r17904)
@@ -197,6 +197,7 @@ static int nuv_packet(AVFormatContext *s
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
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
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;
More information about the ffmpeg-cvslog
mailing list