diff options
author | Philip Langdale <philipl@overt.org> | 2023-01-06 14:11:06 -0800 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2023-01-06 14:12:44 -0800 |
commit | 33e73f4efde974584c9b577ea31f4441ae4545b5 (patch) | |
tree | fb8183ddf06d4291ffa8bb1a80b11c04c8fd4b2f /demux | |
parent | d628e6108e9654499b99d30f7df7b2395662a4ae (diff) | |
download | mpv-33e73f4efde974584c9b577ea31f4441ae4545b5.tar.bz2 mpv-33e73f4efde974584c9b577ea31f4441ae4545b5.tar.xz |
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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/packet.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/demux/packet.c b/demux/packet.c index d42470c5fe..467606050a 100644 --- a/demux/packet.c +++ b/demux/packet.c @@ -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; } |