Commit e0ab29d4 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry
Browse files

Minor decode control flow updates.

This makes op_fetch_and_process_page() always try to fetch another
 page, like it used to (and like its name implies).
There was only one place where we needed the early return for
 unprocessed packets, and getting rid of that actually simplifies
 the logic there (replacing a conditional continue with an
 unconditional one in a slightly different location).
parent 1b114a82
......@@ -1828,11 +1828,8 @@ static int op_fetch_and_process_page(OggOpusFile *_of,
int seekable;
int cur_link;
int ret;
/*We're ready to decode and have at least one packet available already.*/
return 1;
/*We shouldn't get here if we have unprocessed packets.*/
if(!_readp)return 0;
......@@ -2700,8 +2697,6 @@ static int op_read_native(OggOpusFile *_of,
what was decoded.*/
/*Don't grab another page yet.*/
/*Otherwise decode directly into the user's buffer.*/
......@@ -2728,6 +2723,9 @@ static int op_read_native(OggOpusFile *_of,
/*Don't grab another page yet.
This one might have more packets, or might have buffered data now.*/
/*Suck in another page.*/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment