mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
Seek regression for RM demuxer fix
Originally committed as revision 10907 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user