avformat/matroskaenc: Fix memleak upon encountering bogus chapter

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/338/head
Andreas Rheinhardt 5 years ago
parent 0aed3002ad
commit cb255b616c
  1. 1
      libavformat/matroskaenc.c

@ -1463,6 +1463,7 @@ static int mkv_write_chapters(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
"Invalid chapter start (%"PRId64") or end (%"PRId64").\n", "Invalid chapter start (%"PRId64") or end (%"PRId64").\n",
chapterstart, chapterend); chapterstart, chapterend);
ffio_free_dyn_buf(&dyn_cp);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }

Loading…
Cancel
Save