]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
More debug to track why a memory allocation suddenly fails
authorAndreas Öman <andreas@lonelycoder.com>
Wed, 27 Oct 2010 21:51:36 +0000 (21:51 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Wed, 27 Oct 2010 21:51:36 +0000 (21:51 +0000)
src/parsers.c

index ce16fd3abdd3cedb9d23deb791aa92ffc18357a4..45eaf2efd7725931563a1a0585094cba104d364d 100644 (file)
@@ -963,7 +963,11 @@ parse_mpeg2video(th_transport_t *t, th_stream_t *st, size_t len,
       st->st_curpkt = NULL;
 
       st->st_buf.sb_data = malloc(st->st_buf.sb_size);
-      assert(st->st_buf.sb_data != NULL);
+      if(st->st_buf.sb_data == NULL) {
+       fprintf(stderr, "Unable to allocate %d bytes\n",
+               st->st_buf.sb_size);
+       abort();
+      }
 
       /* If we know the frame duration, increase DTS accordingly */
       if(st->st_curdts != PTS_UNSET)