summaryrefslogtreecommitdiffstats
path: root/av_sub.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-07-11 14:02:58 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:14:44 +0200
commit45d5565493ac850548351801557329c15fa95cdd (patch)
treedf59f2afd60e86e39586a5804824d0c297275290 /av_sub.c
parent15575403e5edcbf3e2f84d28b18db4b43134b834 (diff)
downloadmpv-45d5565493ac850548351801557329c15fa95cdd.tar.bz2
mpv-45d5565493ac850548351801557329c15fa95cdd.tar.xz
av_sub: Set size correctly for decoded text subs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31708 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'av_sub.c')
-rw-r--r--av_sub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/av_sub.c b/av_sub.c
index c1a1c7002f..bada534024 100644
--- a/av_sub.c
+++ b/av_sub.c
@@ -102,10 +102,12 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size, double *pts, doub
break;
case SUBTITLE_TEXT:
*data = strdup(sub.rects[0]->text);
+ *size = strlen(*data);
new_type = 't';
break;
case SUBTITLE_ASS:
*data = strdup(sub.rects[0]->ass);
+ *size = strlen(*data);
new_type = 'a';
break;
}