libavformat/hlsenc.c:329: error: Integer Overflow L1
  ([-oo, 0] - 1):unsigned32 by call to `avformat_free_context`.

libavformat/hlsenc.c:328:5: Call
326. 
327.     av_write_trailer(oc);
328.     ff_format_io_close(s, &oc->pb);
         ^
329.     avformat_free_context(oc);
330.     av_free(hls->basename);

libavformat/utils.c:3184:5: Assignment
  3182.     if (*pb)
  3183.         s->io_close(s, *pb);
  3184.     *pb = NULL;
            ^
  3185. }

libavformat/hlsenc.c:329:5: Call
327.     av_write_trailer(oc);
328.     ff_format_io_close(s, &oc->pb);
329.     avformat_free_context(oc);
         ^
330.     av_free(hls->basename);
331.     append_entry(hls, hls->duration);

libavformat/utils.c:2477:1: <LHS trace>
2475. }
2476. 
2477. void avformat_free_context(AVFormatContext *s)
      ^
2478. {
2479.     int i;

libavformat/utils.c:2477:1: Parameter `s->nb_chapters`
  2475. }
  2476. 
  2477. void avformat_free_context(AVFormatContext *s)
        ^
  2478. {
  2479.     int i;

libavformat/utils.c:2498:12: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_free_context` 
  2496.     av_freep(&s->programs);
  2497.     av_freep(&s->priv_data);
  2498.     while (s->nb_chapters--) {
                   ^
  2499.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
  2500.         av_free(s->chapters[s->nb_chapters]);
