Set size correctly for decoded text subs.
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 11 Jul 2010 14:02:58 +0000 (14:02 +0000)
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 11 Jul 2010 14:02:58 +0000 (14:02 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@31708 b3059339-0415-0410-9bf9-f77b7e298cf2

av_sub.c

index 0b560fe..108cc08 100644 (file)
--- a/av_sub.c
+++ b/av_sub.c
@@ -101,10 +101,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;
         }