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
1daa08bd
Commit
1daa08bd
authored
Jan 19, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/wmapro: redone stream selection for XMA1/2
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
e5ac554b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
wmaprodec.c
libavcodec/wmaprodec.c
+21
-8
No files found.
libavcodec/wmaprodec.c
View file @
1daa08bd
...
...
@@ -1635,7 +1635,7 @@ static int decode_packet(AVCodecContext *avctx, WMAProDecodeCtx *s,
num_bits_prev_frame
);
/** check for packet loss */
if
(
avctx
->
codec_id
!=
AV_CODEC_ID_XMA2
&&
!
s
->
packet_loss
&&
if
(
avctx
->
codec_id
==
AV_CODEC_ID_WMAPRO
&&
!
s
->
packet_loss
&&
((
s
->
packet_sequence_number
+
1
)
&
0xF
)
!=
packet_sequence_number
)
{
s
->
packet_loss
=
1
;
av_log
(
avctx
,
AV_LOG_ERROR
,
...
...
@@ -1764,19 +1764,32 @@ static int xma_decode_packet(AVCodecContext *avctx, void *data,
s
->
xma
[
s
->
current_stream
].
packet_loss
)
{
int
bret
;
if
(
s
->
xma
[
0
].
skip_packets
==
0
)
{
if
(
s
->
xma
[
s
->
current_stream
].
skip_packets
==
0
)
{
;
}
else
if
(
s
->
xma
[
0
].
skip_packets
==
0
&&
avctx
->
channels
>=
2
)
{
s
->
current_stream
=
0
;
}
else
if
(
s
->
xma
[
1
].
skip_packets
==
0
)
{
}
else
if
(
s
->
xma
[
1
].
skip_packets
==
0
&&
avctx
->
channels
>=
4
)
{
s
->
current_stream
=
1
;
}
else
if
(
s
->
xma
[
2
].
skip_packets
==
0
)
{
}
else
if
(
s
->
xma
[
2
].
skip_packets
==
0
&&
avctx
->
channels
>=
6
)
{
s
->
current_stream
=
2
;
}
else
if
(
s
->
xma
[
3
].
skip_packets
==
0
)
{
}
else
if
(
s
->
xma
[
3
].
skip_packets
==
0
&&
avctx
->
channels
==
8
)
{
s
->
current_stream
=
3
;
}
else
{
s
->
current_stream
++
;
if
(
s
->
current_stream
>=
avctx
->
channels
/
2
)
s
->
current_stream
=
0
;
int
min
[
2
];
min
[
0
]
=
s
->
xma
[
0
].
skip_packets
;
min
[
1
]
=
i
=
0
;
for
(
i
=
1
;
i
<
avctx
->
channels
/
2
;
i
++
)
{
if
(
s
->
xma
[
i
].
skip_packets
<
min
[
0
])
{
min
[
1
]
=
i
;
min
[
0
]
=
s
->
xma
[
i
].
skip_packets
;
}
}
s
->
current_stream
=
min
[
1
];
}
for
(
i
=
0
;
i
<
avctx
->
channels
/
2
;
i
++
)
{
s
->
xma
[
i
].
skip_packets
=
FFMAX
(
0
,
s
->
xma
[
i
].
skip_packets
-
1
);
}
...
...
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