$ git clone https://tcclient.ion.nu/tc_client.git
commit b2b2afdfc97d3fa86982ecd1a83607397f4d0438
Author: Alicia <...>
Date: Tue Feb 21 14:01:47 2017 +0100
tc_client-gtk: fixed some memory leaks.
diff --git a/ChangeLog b/ChangeLog
index e5a6ea9..f12c3fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ Added workaround in the RTMP acknowledgement code for when 4 gigabytes of data h
modbot: use https instead of http and use the tcclient subdomain since some DNSes have trouble with underscores.
modbot: added an option (--no-unapproved) to not add any unapproved videos to queue (videos still get approved by mods requesting or playing them manually)
tc_client-gtk: fixed a race-condition in the builtin video player.
+tc_client-gtk: fixed some memory leaks.
0.41.1:
Use tinychat.com instead of apl.tinychat.com (works around SSL/TLS issues on windows)
0.41:
diff --git a/utilities/gtk/media.c b/utilities/gtk/media.c
index c379f11..a42e8dd 100644
--- a/utilities/gtk/media.c
+++ b/utilities/gtk/media.c
@@ -108,6 +108,7 @@ void camera_free(struct camera* cam)
{
if(cam->placeholder){g_source_remove(cam->placeholder);}
av_frame_free(&cam->frame);
+ av_frame_free(&cam->dstframe);
avcodec_free_context(&cam->vctx);
#if defined(HAVE_AVRESAMPLE) || defined(HAVE_SWRESAMPLE)
if(cam->actx)
diff --git a/utilities/gtk/playmedia.c b/utilities/gtk/playmedia.c
index 1991978..7971593 100644
--- a/utilities/gtk/playmedia.c
+++ b/utilities/gtk/playmedia.c
@@ -185,7 +185,7 @@ void* playmedia(void* data)
queue_push(&aqueue, &packet, num*1000000*packet.duration/den, pts);
}
// TODO: Handle video-only and audio-only?
- if(aqueue.len<2 || vqueue.len<2){continue;}
+ if(aqueue.len<2 || vqueue.len<2){av_packet_unref(&packet); continue;}
if(aqueue.frames[0].duration>vqueue.frames[0].duration)
{
aqueue.frames[0].duration-=vqueue.frames[0].duration;
@@ -209,6 +209,7 @@ void* playmedia(void* data)
queue_empty(&vqueue);
queue_empty(&aqueue);
}
+ av_packet_unref(&packet);
}
write(fd, "VideoEnd: media\n", 16);
queue_empty(&vqueue);