ref: b19e1b14dee3e5245f2e37bfb193bde72fa70a2d
parent: bb30efe94c5945cdeefea1b0af73679623a53994
author: Jean-Marc Valin <[email protected]>
date: Sat Oct 6 23:55:13 EDT 2018
Fixes a crash on destroy with the pull API
--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -847,7 +847,7 @@
EncStream *tmp = stream;
stream = stream->next;
/* Ignore any error on close. */
- if (tmp->close_at_end) enc->callbacks.close(tmp->user_data);
+ if (tmp->close_at_end && !enc->pull_api) enc->callbacks.close(tmp->user_data);
stream_destroy(tmp);
}
if (enc->chaining_keyframe) free(enc->chaining_keyframe);