Seek regression for RM demuxer fix

Originally committed as revision 10907 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Kostya Shishkov
2007-11-03 06:43:29 +00:00
parent 0ee97f0d3f
commit d447fc3132
3 changed files with 59 additions and 55 deletions

View File

@@ -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

View File

@@ -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;
}