obs-outputs: Log remaining packets

master
jp9000 2015-11-01 15:19:50 -08:00
parent 8756115f67
commit a2a372c141
1 changed files with 7 additions and 0 deletions

View File

@ -89,10 +89,17 @@ static void log_rtmp(int level, const char *format, va_list args)
blogva(LOG_INFO, format, args);
}
static inline size_t num_buffered_packets(struct rtmp_stream *stream);
static inline void free_packets(struct rtmp_stream *stream)
{
size_t num_packets;
pthread_mutex_lock(&stream->packets_mutex);
num_packets = num_buffered_packets(stream);
info("Freeing %d remaining packets", (int)num_packets);
while (stream->packets.size) {
struct encoder_packet packet;
circlebuf_pop_front(&stream->packets, &packet, sizeof(packet));