summaryrefslogtreecommitdiffstats
path: root/av_sub.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-07-11 07:37:02 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:14:43 +0200
commit747a30b81b375b16d1f3e4f932c51ddb970da3e6 (patch)
tree62f7f04d330c602455a246bc303d276b5ae4beb0 /av_sub.c
parent5deeba5f6a2b1933355dcda0af94099c051c7fe9 (diff)
downloadmpv-747a30b81b375b16d1f3e4f932c51ddb970da3e6.tar.bz2
mpv-747a30b81b375b16d1f3e4f932c51ddb970da3e6.tar.xz
av_sub: Fix memory leak for subtitles decoded by libavcodec
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31690 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'av_sub.c')
-rw-r--r--av_sub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/av_sub.c b/av_sub.c
index eba46fa6d8..9a7c832594 100644
--- a/av_sub.c
+++ b/av_sub.c
@@ -97,7 +97,9 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, doub
break;
}
}
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 82, 0)
if (got_sub)
- ; // TODO: free sub once there is a free function...
+ avsubtitle_free(&sub);
+#endif
return new_type;
}