Mercurial > libavformat.hg
changeset 2696:7671acabd99c libavformat
Seek regression for RM demuxer fix
author | kostya |
---|---|
date | Sat, 03 Nov 2007 06:43:29 +0000 |
parents | b89af3f21df6 |
children | afbdd52324e3 |
files | rm.h rmdec.c |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rm.h Thu Nov 01 18:02:03 2007 +0000 +++ b/rm.h Sat Nov 03 06:43:29 2007 +0000 @@ -51,6 +51,7 @@ int videobufpos; ///< position for the next slice in the video buffer int curpic_num; ///< picture number of current frame int cur_slice, slices; + int64_t pktpos; ///< first slice position in file /// Audio descrambling matrix parameters uint8_t *audiobuf; ///< place to store reordered audio data int64_t audiotimestamp; ///< Audio packet timestamp
--- a/rmdec.c Thu Nov 01 18:02:03 2007 +0000 +++ b/rmdec.c Sat Nov 03 06:43:29 2007 +0000 @@ -486,6 +486,7 @@ rm->videobufpos = 8*rm->slices + 1; rm->cur_slice = 0; rm->curpic_num = pic_num; + rm->pktpos = url_ftell(pb); } if(type == 2){ len = FFMIN(len, pos); @@ -512,6 +513,8 @@ if(av_new_packet(pkt, ssize) < 0) return AVERROR(ENOMEM); memcpy(pkt->data, rm->videobuf, ssize); + pkt->pts = AV_NOPTS_VALUE; + pkt->pos = rm->pktpos; return 0; }