Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
593ef6c5
Commit
593ef6c5
authored
Aug 05, 2007
by
Rémi Denis-Courmont
Browse files
Ignore frame with zero size.
This needs to be *reviewed*.
parent
0790860f
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/codec/speex.c
View file @
593ef6c5
...
...
@@ -470,7 +470,8 @@ static aout_buffer_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
if
(
p_sys
->
i_frame_in_packet
<
p_sys
->
p_header
->
frames_per_packet
)
{
aout_buffer_t
*
p_aout_buffer
;
int
i_ret
;
if
(
p_sys
->
p_header
->
frame_size
==
0
)
return
NULL
;
p_aout_buffer
=
p_dec
->
pf_aout_buffer_new
(
p_dec
,
p_sys
->
p_header
->
frame_size
);
...
...
@@ -479,18 +480,13 @@ static aout_buffer_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
return
NULL
;
}
i_ret
=
speex_decode_int
(
p_sys
->
p_state
,
&
p_sys
->
bits
,
(
int16_t
*
)
p_aout_buffer
->
p_buffer
);
if
(
i_ret
==
-
1
)
{
/* End of stream */
return
NULL
;
}
if
(
i_ret
==
-
2
)
switch
(
speex_decode_int
(
p_sys
->
p_state
,
&
p_sys
->
bits
,
(
int16_t
*
)
p_aout_buffer
->
p_buffer
)
)
{
msg_Warn
(
p_dec
,
"decoding error: corrupted stream?"
);
return
NULL
;
case
-
2
:
msg_Warn
(
p_dec
,
"decoding error: corrupted stream?"
);
case
-
1
:
/* End of stream */
return
NULL
;
}
if
(
speex_bits_remaining
(
&
p_sys
->
bits
)
<
0
)
...
...
Write
Preview
Supports
Markdown
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