diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-11-03 06:43:29 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-11-03 06:43:29 +0000 |
commit | d447fc3132e79ace820a761d052930fe10573d23 (patch) | |
tree | 7f3fada5ffc4237b994fedaabfdfcc7da1471037 /libavformat | |
parent | 0ee97f0d3fd82c5752f538269eee161a5c7942cb (diff) | |
download | ffmpeg-d447fc3132e79ace820a761d052930fe10573d23.tar.gz |
Seek regression for RM demuxer fix
Originally committed as revision 10907 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rm.h | 1 | ||||
-rw-r--r-- | libavformat/rmdec.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rm.h b/libavformat/rm.h index a9673f0648..4acf226f48 100644 --- a/libavformat/rm.h +++ b/libavformat/rm.h @@ -51,6 +51,7 @@ typedef struct { 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 diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 1b88766654..09776cd9ff 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -486,6 +486,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket * 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 @@ static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket * 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; } |