various: add some missing error checks

This commit is contained in:
Kacper Michajłow
2023-11-18 23:30:42 +01:00
committed by Dudemanguy
parent 9456b2f6e9
commit 4449f38c17
7 changed files with 20 additions and 5 deletions

View File

@@ -290,7 +290,7 @@ static void print_stream(struct MPContext *mpctx, struct track *t)
APPEND(b, " %dHz", s->codec->samplerate);
}
APPEND(b, ")");
if (s->hls_bitrate > 0)
if (s && s->hls_bitrate > 0)
APPEND(b, " (%d kbps)", (s->hls_bitrate + 500) / 1000);
if (t->is_external)
APPEND(b, " (external)");