From c65ae2904192965e7c9fcafe8c1ae5fa0649eea4 Mon Sep 17 00:00:00 2001 From: Eugene Kliuchnikov Date: Mon, 21 Aug 2023 12:31:22 +0200 Subject: [PATCH] Fix #173 (#176) Do not touch 0-th element if array in not allocated --- frontend/mp4read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/mp4read.c b/frontend/mp4read.c index 749da8ad..a157d7d6 100644 --- a/frontend/mp4read.c +++ b/frontend/mp4read.c @@ -1036,7 +1036,8 @@ static void mp4info(void) fprintf(stderr, "Frames:\t\t\t%d\n", mp4config.frame.nsamples); fprintf(stderr, "ASC size:\t\t%d\n", mp4config.asc.size); fprintf(stderr, "Duration:\t\t%.1f sec\n", (float)mp4config.samples/mp4config.samplerate); - fprintf(stderr, "Data offset:\t%x\n", mp4config.frame.info[0].offset); + if (mp4config.frame.nsamples) + fprintf(stderr, "Data offset:\t%x\n", mp4config.frame.info[0].offset); } int mp4read_close(void)