Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
d880240e
Commit
d880240e
authored
Dec 06, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timestamp fix
Originally committed as revision 3732 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d43ed92d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
rm.c
libavformat/rm.c
+22
-2
No files found.
libavformat/rm.c
View file @
d880240e
...
...
@@ -628,6 +628,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
codec_data_size
=
get_be32
(
pb
);
codec_pos
=
url_ftell
(
pb
);
st
->
codec
.
codec_type
=
CODEC_TYPE_DATA
;
av_set_pts_info
(
st
,
64
,
1
,
1000
);
v
=
get_be32
(
pb
);
if
(
v
==
MKTAG
(
0xfd
,
'a'
,
'r'
,
'.'
))
{
...
...
@@ -724,7 +725,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
AVStream
*
st
;
int
len
,
num
,
timestamp
,
i
,
tmp
,
j
;
uint8_t
*
ptr
;
int
flags
;
int
flags
,
res
;
if
(
rm
->
old_format
)
{
/* just read raw bytes */
...
...
@@ -748,8 +749,11 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
return
AVERROR_IO
;
num
=
get_be16
(
pb
);
timestamp
=
get_be32
(
pb
);
get_byte
(
pb
);
/* reserved */
res
=
get_byte
(
pb
);
/* reserved */
flags
=
get_byte
(
pb
);
/* flags */
// av_log(s, AV_LOG_DEBUG, "%d %d %X %d\n", num, timestamp, flags, res);
rm
->
nb_packets
--
;
len
-=
12
;
...
...
@@ -798,6 +802,22 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
av_new_packet
(
pkt
,
len
);
pkt
->
stream_index
=
i
;
get_buffer
(
pb
,
pkt
->
data
,
len
);
#if 0
if (st->codec.codec_type == CODEC_TYPE_VIDEO) {
if(st->codec.codec_id == CODEC_ID_RV20){
int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
av_log(NULL, AV_LOG_DEBUG, "%d %Ld %d\n", timestamp, timestamp*512LL/25, seq);
seq |= (timestamp&~0x3FFF);
if(seq - timestamp > 0x2000) seq -= 0x4000;
if(seq - timestamp < -0x2000) seq += 0x4000;
}
}
#endif
pkt
->
pts
=
timestamp
;
if
(
flags
&
2
)
pkt
->
flags
|=
PKT_FLAG_KEY
;
}
/* for AC3, needs to swap bytes */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment