mirror of https://github.com/mpv-player/mpv
demux: add missing NULL check
It is assigned to NULL above is !stream.
This commit is contained in:
parent
7d7276e384
commit
9456b2f6e9
|
@ -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)
|
static void add_packet_locked(struct sh_stream *stream, demux_packet_t *dp)
|
||||||
{
|
{
|
||||||
struct demux_stream *ds = stream ? stream->ds : NULL;
|
struct demux_stream *ds = stream ? stream->ds : NULL;
|
||||||
|
assert(ds && ds->in);
|
||||||
if (!dp->len || demux_cancel_test(ds->in->d_thread)) {
|
if (!dp->len || demux_cancel_test(ds->in->d_thread)) {
|
||||||
talloc_free(dp);
|
talloc_free(dp);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue