[input] Pass read errors to the player through the input buffer

This commit is contained in:
ejurgensen
2017-03-11 19:23:49 +01:00
parent 6c94cdd635
commit 5d74c98431
3 changed files with 42 additions and 16 deletions

View File

@@ -25,8 +25,10 @@ enum input_flags
INPUT_FLAG_NONBLOCK = (1 << 0),
// Flags end of file
INPUT_FLAG_EOF = (1 << 1),
// Flags error reading file
INPUT_FLAG_ERROR = (1 << 2),
// Flags possible new stream metadata
INPUT_FLAG_METADATA = (1 << 2),
INPUT_FLAG_METADATA = (1 << 3),
};
struct player_source
@@ -164,7 +166,7 @@ input_wait(void);
*
* @in data Output buffer
* @in size How much data to move to the output buffer
* @out flags Flags INPUT_FLAG_EOF or INPUT_FLAG_METADATA
* @out flags Flags INPUT_FLAG_*
* @return Number of bytes moved, -1 on error
*/
int