srtdec: make sure we don't write past the end of buffer
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>