1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2012-09-09 14:11:34 +02:00
parent d7cb5a8daf
commit 9fea619f19

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");