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
b011bb5f
Commit
b011bb5f
authored
Dec 20, 2016
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmavoice: reindent.
parent
3deb4b54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
wmavoice.c
libavcodec/wmavoice.c
+36
-36
No files found.
libavcodec/wmavoice.c
View file @
b011bb5f
...
@@ -1915,29 +1915,29 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
...
@@ -1915,29 +1915,29 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
/* If the packet header specifies a s->spillover_nbits, then we want
/* If the packet header specifies a s->spillover_nbits, then we want
* to push out all data of the previous packet (+ spillover) before
* to push out all data of the previous packet (+ spillover) before
* continuing to parse new superframes in the current packet. */
* continuing to parse new superframes in the current packet. */
if
(
s
->
sframe_cache_size
>
0
)
{
if
(
s
->
sframe_cache_size
>
0
)
{
int
cnt
=
get_bits_count
(
gb
);
int
cnt
=
get_bits_count
(
gb
);
copy_bits
(
&
s
->
pb
,
avpkt
->
data
,
size
,
gb
,
s
->
spillover_nbits
);
copy_bits
(
&
s
->
pb
,
avpkt
->
data
,
size
,
gb
,
s
->
spillover_nbits
);
flush_put_bits
(
&
s
->
pb
);
flush_put_bits
(
&
s
->
pb
);
s
->
sframe_cache_size
+=
s
->
spillover_nbits
;
s
->
sframe_cache_size
+=
s
->
spillover_nbits
;
if
((
res
=
synth_superframe
(
ctx
,
data
,
got_frame_ptr
))
==
0
&&
if
((
res
=
synth_superframe
(
ctx
,
data
,
got_frame_ptr
))
==
0
&&
*
got_frame_ptr
)
{
*
got_frame_ptr
)
{
cnt
+=
s
->
spillover_nbits
;
cnt
+=
s
->
spillover_nbits
;
s
->
skip_bits_next
=
cnt
&
7
;
s
->
skip_bits_next
=
cnt
&
7
;
res
=
cnt
>>
3
;
res
=
cnt
>>
3
;
if
(
res
>
avpkt
->
size
)
{
if
(
res
>
avpkt
->
size
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
ctx
,
AV_LOG_ERROR
,
"Trying to skip %d bytes in packet of size %d
\n
"
,
"Trying to skip %d bytes in packet of size %d
\n
"
,
res
,
avpkt
->
size
);
res
,
avpkt
->
size
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
return
res
;
return
res
;
}
else
}
else
skip_bits_long
(
gb
,
s
->
spillover_nbits
-
cnt
+
skip_bits_long
(
gb
,
s
->
spillover_nbits
-
cnt
+
get_bits_count
(
gb
));
// resync
get_bits_count
(
gb
));
// resync
}
else
if
(
s
->
spillover_nbits
)
{
}
else
if
(
s
->
spillover_nbits
)
{
skip_bits_long
(
gb
,
s
->
spillover_nbits
);
// resync
skip_bits_long
(
gb
,
s
->
spillover_nbits
);
// resync
}
}
}
else
if
(
s
->
skip_bits_next
)
}
else
if
(
s
->
skip_bits_next
)
skip_bits
(
gb
,
s
->
skip_bits_next
);
skip_bits
(
gb
,
s
->
skip_bits_next
);
...
@@ -1949,20 +1949,20 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
...
@@ -1949,20 +1949,20 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
*
got_frame_ptr
=
0
;
*
got_frame_ptr
=
0
;
return
size
;
return
size
;
}
else
if
(
s
->
nb_superframes
>
0
)
{
}
else
if
(
s
->
nb_superframes
>
0
)
{
if
((
res
=
synth_superframe
(
ctx
,
data
,
got_frame_ptr
))
<
0
)
{
if
((
res
=
synth_superframe
(
ctx
,
data
,
got_frame_ptr
))
<
0
)
{
return
res
;
return
res
;
}
else
if
(
*
got_frame_ptr
)
{
}
else
if
(
*
got_frame_ptr
)
{
int
cnt
=
get_bits_count
(
gb
);
int
cnt
=
get_bits_count
(
gb
);
s
->
skip_bits_next
=
cnt
&
7
;
s
->
skip_bits_next
=
cnt
&
7
;
res
=
cnt
>>
3
;
res
=
cnt
>>
3
;
if
(
res
>
avpkt
->
size
)
{
if
(
res
>
avpkt
->
size
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
ctx
,
AV_LOG_ERROR
,
"Trying to skip %d bytes in packet of size %d
\n
"
,
"Trying to skip %d bytes in packet of size %d
\n
"
,
res
,
avpkt
->
size
);
res
,
avpkt
->
size
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
return
res
;
}
}
return
res
;
}
}
else
if
((
s
->
sframe_cache_size
=
pos
)
>
0
)
{
}
else
if
((
s
->
sframe_cache_size
=
pos
)
>
0
)
{
/* ... cache it for spillover in next packet */
/* ... cache it for spillover in next packet */
init_put_bits
(
&
s
->
pb
,
s
->
sframe_cache
,
SFRAME_CACHE_MAXSIZE
);
init_put_bits
(
&
s
->
pb
,
s
->
sframe_cache
,
SFRAME_CACHE_MAXSIZE
);
...
...
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