faad: check the result of adts_find_frame()
Instead of checking if the buffer is empty after adts_find_frame(), check adts_find_frame()'s return value. This is more robust.
This commit is contained in:
parent
77db32f8fb
commit
7cea5357e3
@ -392,10 +392,8 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
|
||||
file_time = 0.0;
|
||||
|
||||
do {
|
||||
adts_find_frame(&buffer);
|
||||
faad_buffer_fill(&buffer);
|
||||
|
||||
if (buffer.length == 0)
|
||||
size_t frame_size = adts_find_frame(&buffer);
|
||||
if (frame_size == 0)
|
||||
break;
|
||||
|
||||
decoded = faad_decoder_decode(decoder, &buffer, &frame_info);
|
||||
|
Loading…
Reference in New Issue
Block a user