Commit 9fea619f authored by Michael Niedermayer's avatar Michael Niedermayer

ass: assert that the timsstamps fitted in the buffers

Failure of the assert would cause various problems later
if we continue.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d7cb5a8d
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment