From 38792c00a5d6b4c389acb67f437622b950a58c88 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 3 Feb 2020 13:39:07 -0500 Subject: [PATCH] TT#75352 don't attempt to send uninitialised packets This can presumably happen when an encoder gets re-initialised due to an SSRC table overflow, or when a passthrough encoder (e.g. G.729) returns no data. Possibly fixes #915 Change-Id: Ib351054b99754f46d0a8fb2d49629ce7c48dc964 --- daemon/codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/codec.c b/daemon/codec.c index 8a9479172..5f608c2f5 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -1452,7 +1452,7 @@ static int __packet_encoded(encoder_t *enc, void *u1, void *u2) { int ret = ch->handler->dest_pt.codec_def->packetizer(in_pkt, ch->sample_buffer, &inout, enc); - if (G_UNLIKELY(ret == -1)) { + if (G_UNLIKELY(ret == -1 || enc->avpkt.pts == AV_NOPTS_VALUE)) { // nothing free(buf); break;