diff --git a/src/outputs.c b/src/outputs.c index 7cefba3a..00a8286e 100644 --- a/src/outputs.c +++ b/src/outputs.c @@ -313,7 +313,6 @@ buffer_fill(struct output_buffer *obuf, void *buf, size_t bufsize, struct media_ int i; int n; - obuf->write_counter++; obuf->pts = *pts; // The resampling/encoding (transcode) contexts work for a given input quality, diff --git a/src/outputs.h b/src/outputs.h index 2afc9362..8d30f1ba 100644 --- a/src/outputs.h +++ b/src/outputs.h @@ -187,9 +187,11 @@ struct output_data struct output_buffer { - uint32_t write_counter; // REMOVE ME? not used for anything struct timespec pts; - struct output_data data[OUTPUTS_MAX_QUALITY_SUBSCRIPTIONS + 1]; + // The array is two larger than max quality subscriptions because element 0 + // holds the original, untranscoded, data (which might not have any + // subscribers, and the last element is a zero terminator. + struct output_data data[OUTPUTS_MAX_QUALITY_SUBSCRIPTIONS + 2]; } output_buffer; struct output_definition