summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-13 02:03:10 +0200
committerwm4 <wm4@nowhere>2014-06-13 02:03:10 +0200
commit5fed3a253eb556b83cae2c35cb671a2b88a31195 (patch)
tree162fbeea463442a58bfc5e0909071e644dcc340f /demux/demux.c
parent7e7ff4b0ea745a60437b9a2641044761bd2ca002 (diff)
downloadmpv-5fed3a253eb556b83cae2c35cb671a2b88a31195.tar.bz2
mpv-5fed3a253eb556b83cae2c35cb671a2b88a31195.tar.xz
demux: use av_malloc for packets
Probably "needed" to get the correct alignment, although I'm not aware of actual breakages or performance issues. In fact we should probably always just allocate AVPackets, but for now use the simple fix.
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c
index acdee69d4b..833dc38be5 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -116,7 +116,7 @@ static void packet_destroy(void *ptr)
{
struct demux_packet *dp = ptr;
talloc_free(dp->avpacket);
- free(dp->allocation);
+ av_free(dp->allocation);
}
static struct demux_packet *create_packet(size_t len)
@@ -142,7 +142,7 @@ static struct demux_packet *create_packet(size_t len)
struct demux_packet *new_demux_packet(size_t len)
{
struct demux_packet *dp = create_packet(len);
- dp->buffer = malloc(len + FF_INPUT_BUFFER_PADDING_SIZE);
+ dp->buffer = av_malloc(len + FF_INPUT_BUFFER_PADDING_SIZE);
if (!dp->buffer) {
fprintf(stderr, "Memory allocation failure!\n");
abort();