diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-09 14:11:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-09 14:19:02 +0200 |
commit | 9fea619f19cd6db78a3457ee929bf006d916035b (patch) | |
tree | 33030531334eece31946591b8681b4e277365241 | |
parent | d7cb5a8daf73825d4ffa623be4c2b798c81f41a5 (diff) | |
download | ffmpeg-9fea619f19cd6db78a3457ee929bf006d916035b.tar.gz |
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>
-rw-r--r-- | libavcodec/ass.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c index 6eb92f7610..db0fdd8504 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -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"); |