diff --git a/daemon/codec.c b/daemon/codec.c index 7ad0406ba..4ad79cfee 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -951,7 +951,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;