Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
7ccefd08
Commit
7ccefd08
authored
16 years ago
by
Ronald S. Bultje
Browse files
Options
Downloads
Patches
Plain Diff
Revert to r17908.
Originally committed as revision 17918 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d2af5697
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/rmdec.c
+32
-13
32 additions, 13 deletions
libavformat/rmdec.c
with
32 additions
and
13 deletions
libavformat/rmdec.c
+
32
−
13
View file @
7ccefd08
...
...
@@ -468,7 +468,7 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
skip:
/* skip packet if unknown number */
url_fskip
(
pb
,
len
);
rm
->
remaining_len
=
0
;
rm
->
remaining_len
-
=
len
;
continue
;
}
*
stream_index
=
i
;
...
...
@@ -691,8 +691,9 @@ ff_rm_retrieve_cache (AVFormatContext *s, ByteIOContext *pb,
static
int
rm_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
RMDemuxContext
*
rm
=
s
->
priv_data
;
ByteIOContext
*
pb
=
s
->
pb
;
AVStream
*
st
;
int
i
,
len
,
seq
=
1
;
int
i
,
len
;
int64_t
timestamp
,
pos
;
int
flags
;
...
...
@@ -701,19 +702,37 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
st
=
s
->
streams
[
rm
->
audio_stream_num
];
ff_rm_retrieve_cache
(
s
,
s
->
pb
,
st
,
st
->
priv_data
,
pkt
);
}
else
if
(
rm
->
old_format
)
{
RMStream
*
ast
=
s
->
streams
[
0
]
->
priv_data
;
int
res
,
y
,
h
=
ast
->
audio_framesize
?
ast
->
sub_packet_h
:
1
;
timestamp
=
AV_NOPTS_VALUE
;
len
=
ast
->
audio_framesize
?
ast
->
coded_framesize
*
h
/
2
:
RAW_PACKET_SIZE
;
for
(
y
=
0
;
y
<
h
;
y
++
)
{
flags
=
!
y
?
2
:
0
;
res
=
ff_rm_parse_packet
(
s
,
s
->
pb
,
s
->
streams
[
0
],
ast
,
len
,
pkt
,
&
seq
,
&
flags
,
&
timestamp
);
RMStream
*
ast
;
st
=
s
->
streams
[
0
];
ast
=
st
->
priv_data
;
if
(
st
->
codec
->
codec_id
==
CODEC_ID_RA_288
)
{
int
x
,
y
;
for
(
y
=
0
;
y
<
ast
->
sub_packet_h
;
y
++
)
for
(
x
=
0
;
x
<
ast
->
sub_packet_h
/
2
;
x
++
)
if
(
get_buffer
(
pb
,
ast
->
pkt
.
data
+
x
*
2
*
ast
->
audio_framesize
+
y
*
ast
->
coded_framesize
,
ast
->
coded_framesize
)
<=
0
)
return
AVERROR
(
EIO
);
rm
->
audio_stream_num
=
0
;
rm
->
audio_pkt_cnt
=
ast
->
sub_packet_h
*
ast
->
audio_framesize
/
st
->
codec
->
block_align
-
1
;
// Release first audio packet
av_new_packet
(
pkt
,
st
->
codec
->
block_align
);
memcpy
(
pkt
->
data
,
ast
->
pkt
.
data
,
st
->
codec
->
block_align
);
//FIXME avoid this
pkt
->
flags
|=
PKT_FLAG_KEY
;
// Mark first packet as keyframe
pkt
->
stream_index
=
0
;
}
else
{
/* just read raw bytes */
len
=
RAW_PACKET_SIZE
;
len
=
av_get_packet
(
pb
,
pkt
,
len
);
pkt
->
stream_index
=
0
;
if
(
len
<=
0
)
{
return
AVERROR
(
EIO
);
}
pkt
->
size
=
len
;
}
if
(
res
<
0
)
return
res
;
rm_ac3_swap_bytes
(
st
,
pkt
);
}
else
{
int
seq
=
1
;
resync:
len
=
sync
(
s
,
&
timestamp
,
&
flags
,
&
i
,
&
pos
);
if
(
len
<
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment