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
45e5d0c3
Commit
45e5d0c3
authored
Oct 01, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libspeexdec: properly handle DTX for multiple frames-per-packet
parent
908e22b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
libspeexdec.c
libavcodec/libspeexdec.c
+6
-4
No files found.
libavcodec/libspeexdec.c
View file @
45e5d0c3
...
@@ -119,10 +119,12 @@ static int libspeex_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -119,10 +119,12 @@ static int libspeex_decode_frame(AVCodecContext *avctx, void *data,
}
}
output
=
(
int16_t
*
)
s
->
frame
.
data
[
0
];
output
=
(
int16_t
*
)
s
->
frame
.
data
[
0
];
/* if there is not enough data left for the smallest possible frame,
/* if there is not enough data left for the smallest possible frame or the
reset the libspeex buffer using the current packet, otherwise ignore
next 5 bits are a terminator code, reset the libspeex buffer using the
the current packet and keep decoding frames from the libspeex buffer. */
current packet, otherwise ignore the current packet and keep decoding
if
(
speex_bits_remaining
(
&
s
->
bits
)
<
43
)
{
frames from the libspeex buffer. */
if
(
speex_bits_remaining
(
&
s
->
bits
)
<
5
||
speex_bits_peek_unsigned
(
&
s
->
bits
,
5
)
==
0x1F
)
{
/* check for flush packet */
/* check for flush packet */
if
(
!
buf
||
!
buf_size
)
{
if
(
!
buf
||
!
buf_size
)
{
*
got_frame_ptr
=
0
;
*
got_frame_ptr
=
0
;
...
...
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