av_sub: Set size correctly for decoded text subs

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31708 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-07-11 14:02:58 +00:00 committed by Uoti Urpala
parent 15575403e5
commit 45d5565493
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}