decoder/faad: eliminate local variable "ret"
This commit is contained in:
parent
582c2105a9
commit
d403749d09
@ -67,15 +67,13 @@ static size_t
|
|||||||
adts_find_frame(DecoderBuffer *buffer)
|
adts_find_frame(DecoderBuffer *buffer)
|
||||||
{
|
{
|
||||||
size_t length, frame_length;
|
size_t length, frame_length;
|
||||||
bool ret;
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
const uint8_t *data = (const uint8_t *)
|
const uint8_t *data = (const uint8_t *)
|
||||||
decoder_buffer_read(buffer, &length);
|
decoder_buffer_read(buffer, &length);
|
||||||
if (data == nullptr || length < 8) {
|
if (data == nullptr || length < 8) {
|
||||||
/* not enough data yet */
|
/* not enough data yet */
|
||||||
ret = decoder_buffer_fill(buffer);
|
if (!decoder_buffer_fill(buffer))
|
||||||
if (!ret)
|
|
||||||
/* failed */
|
/* failed */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -109,8 +107,7 @@ adts_find_frame(DecoderBuffer *buffer)
|
|||||||
/* available buffer size is smaller than the
|
/* available buffer size is smaller than the
|
||||||
frame will be - attempt to read more
|
frame will be - attempt to read more
|
||||||
data */
|
data */
|
||||||
ret = decoder_buffer_fill(buffer);
|
if (!decoder_buffer_fill(buffer)) {
|
||||||
if (!ret) {
|
|
||||||
/* not enough data; discard this frame
|
/* not enough data; discard this frame
|
||||||
to prevent a possible buffer
|
to prevent a possible buffer
|
||||||
overflow */
|
overflow */
|
||||||
|
Loading…
Reference in New Issue
Block a user