demux: new packet should not point to source buffer when copying data

In `new_demux_packet_from`, we initialise a new packet and allocate a
buffer which we copy the source data into. But I was then assigning
the original source pointer as the packet's buffer, rather than keeping
the newly allocated one. Whoops.
This commit is contained in:
Philip Langdale 2023-01-06 14:11:06 -08:00
parent d628e6108e
commit 33e73f4efd
1 changed files with 0 additions and 1 deletions

View File

@ -120,7 +120,6 @@ struct demux_packet *new_demux_packet_from(void *data, size_t len)
if (!dp)
return NULL;
memcpy(dp->avpacket->data, data, len);
dp->buffer = data;
return dp;
}