Browse Source

ass: assert that the timsstamps fitted in the buffers

Failure of the assert would cause various problems later
if we continue.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
9fea619f19
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/ass.c

+ 2
- 0
libavcodec/ass.c View File

@@ -21,6 +21,7 @@

#include "avcodec.h"
#include "ass.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"

@@ -85,6 +86,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
ts_to_string(s_end, sizeof(s_end), ts_start + duration);
len = snprintf(header, sizeof(header), "Dialogue: 0,%s,%s,Default,",
s_start, s_end);
av_assert0(len < sizeof(header));
}

dlen = strcspn(dialog, "\n");


Loading…
Cancel
Save