---
libavformat/rmdec.c | 9 ++++++---
tests/ref/fate/rv30 | 24 ++++++++++++------------
2 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index d6a5251..c04c93c 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -577,7 +577,8 @@ skip:
static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
RMDemuxContext *rm, RMStream *vst,
- AVPacket *pkt, int len, int *pseq)
+ AVPacket *pkt, int len, int *pseq,
+ int64_t *timestamp)
{
int hdr, seq, pic_num, len2, pos;
int type;
@@ -597,8 +598,10 @@ static int rm_assemble_video_frame(AVFormatContext *s,
AVIOContext *pb,
return -1;
rm->remaining_len = len;
if(type&1){ // frame, not slice
- if(type == 3) // frame as a part of packet
+ if(type == 3) { // frame as a part of packet
len= len2;
+ *timestamp = pos;
+ }
if(rm->remaining_len < len)
return -1;
rm->remaining_len -= len;
@@ -706,7 +709,7 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
rm->current_stream= st->id;
- if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq))
+ if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq, ×tamp))
return -1; //got partial frame
} else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
if ((st->codec->codec_id == CODEC_ID_RA_288) ||
diff --git a/tests/ref/fate/rv30 b/tests/ref/fate/rv30
index 5b43588..76eddff 100644
--- a/tests/ref/fate/rv30
+++ b/tests/ref/fate/rv30
@@ -1,16 +1,16 @@
0, 0, 126720, 0xcefaec47
0, 7500, 126720, 0xa416ece5
0, 15000, 126720, 0xa416ece5
-0, 22500, 126720, 0xa416ece5
-0, 30000, 126720, 0xcc10f4b7
+0, 22500, 126720, 0x259af497
+0, 30000, 126720, 0x5e6ff4d7
0, 37500, 126720, 0xeb6fb8d7
-0, 45000, 126720, 0xda71b917
-0, 52500, 126720, 0xbb1abbb7
-0, 60000, 126720, 0x273fbc37
-0, 67500, 126720, 0x16eebbd7
-0, 75000, 126720, 0x105eb927
-0, 82500, 126720, 0x7fa3ae27
-0, 90000, 126720, 0xd115a757
+0, 45000, 126720, 0xbb1abbb7
+0, 52500, 126720, 0x273fbc37
+0, 60000, 126720, 0x7fa3ae27
+0, 67500, 126720, 0x722e99f7
+0, 75000, 126720, 0x29d6a887
+0, 82500, 126720, 0xd115a757
+0, 90000, 126720, 0x6ddaef32
0, 97500, 126720, 0x04e7897c
0, 105000, 126720, 0x68cfda2b
0, 112500, 126720, 0xe572dfc9
@@ -25,11 +25,11 @@
0, 180000, 126720, 0x8b07a1db
0, 187500, 126720, 0x8c639b34
0, 195000, 126720, 0x63eb0b9f
-0, 202500, 126720, 0x31c80c83
+0, 202500, 126720, 0xa9795101
0, 210000, 126720, 0x78495352
0, 217500, 126720, 0x63d609c4
-0, 225000, 126720, 0xcd2a62d8
-0, 232500, 126720, 0x4aea732d
+0, 225000, 126720, 0x4aea732d
+0, 232500, 126720, 0x84f3482c
0, 240000, 126720, 0xe3bb352c
0, 247500, 126720, 0x4b9036ad
0, 255000, 126720, 0x88b66e2d
--
1.7.0.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel