demux: add missing NULL check

It is assigned to NULL above is !stream.
This commit is contained in:
Kacper Michajłow 2023-11-18 23:27:59 +01:00 committed by Dudemanguy
parent 7d7276e384
commit 9456b2f6e9
1 changed files with 1 additions and 0 deletions

View File

@ -1990,6 +1990,7 @@ static void record_packet(struct demux_internal *in, struct demux_packet *dp)
static void add_packet_locked(struct sh_stream *stream, demux_packet_t *dp)
{
struct demux_stream *ds = stream ? stream->ds : NULL;
assert(ds && ds->in);
if (!dp->len || demux_cancel_test(ds->in->d_thread)) {
talloc_free(dp);
return;