From: Andreas Ă–man Date: Wed, 27 Oct 2010 21:51:36 +0000 (+0000) Subject: More debug to track why a memory allocation suddenly fails X-Git-Tag: 2.12~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fee5c55922a832198b59933f7894be7456dc4b48;p=thirdparty%2Ftvheadend.git More debug to track why a memory allocation suddenly fails --- diff --git a/src/parsers.c b/src/parsers.c index ce16fd3ab..45eaf2efd 100644 --- a/src/parsers.c +++ b/src/parsers.c @@ -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)