shithub: libopusenc

Download patch

ref: 974014358337d267e2db7edce22a950fe88ec0f4
parent: 5469071691e61de636ce3ee69bcf7516a769f429
author: Jean-Marc Valin <[email protected]>
date: Fri May 12 14:17:28 EDT 2017

Fix granulepos bug on empty streams

--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -654,6 +654,7 @@
   new_stream = stream_create(comments);
   if (!new_stream) return OPE_ALLOC_FAIL;
   new_stream->user_data = user_data;
+  new_stream->end_granule = enc->write_granule;
   enc->last_stream->next = new_stream;
   enc->last_stream = new_stream;
   return OPE_OK;