Require libass version with ass_flush_events
[mplayer.git] / 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;
         }