summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-13 02:03:10 +0200
committerwm4 <wm4@nowhere>2014-06-14 14:07:23 +0200
commite6ac54e3337fdbd9eba0b844e4dd7840b3563e86 (patch)
tree9b4bbcc50ed35119d50bc54bd148cfa2e4126524
parent54c2a95792678c8f113dd8eaa3938d4252d01f20 (diff)
downloadmpv-e6ac54e3337fdbd9eba0b844e4dd7840b3563e86.tar.bz2
mpv-e6ac54e3337fdbd9eba0b844e4dd7840b3563e86.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.
-rw-r--r--demux/demux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c
index b5a4cc569b..0649175144 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -113,7 +113,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)
@@ -139,7 +139,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();