Commit Diff
- Commit:
a130f0271c0a856e6104a3eec0a4101b4c75f5df
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- free the FILE on op_open_callbacks failure the API is a bit of a shitshow. op_fdopen is just a wrapper around FILE*, but returns void* for don't know what Windows limitation. if op_open_callbacks fails we have to free the stream by ourselves. the documentation implies that this void* pointer is, in fact, a FILE*.
- Actions:
- Patch | Tree
--- player_opus.c +++ player_opus.c @@ -54,7 +54,7 @@ play_opus(int fd) of = op_open_callbacks(f, &cb, NULL, 0, &r); if (of == NULL) { - close(fd); + fclose(f); return -1; }