diff options
author | wm4 <wm4@nowhere> | 2013-10-13 01:16:30 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-13 01:16:30 +0200 |
commit | c613d802bc5d87a7be031aaf97996d96bd8af909 (patch) | |
tree | 5f18f9ceaf51cb077861099def7dabe3422676f3 /demux | |
parent | 8d5f800567d81665820d308b7f2d482c18c51e15 (diff) | |
download | mpv-c613d802bc5d87a7be031aaf97996d96bd8af909.tar.bz2 mpv-c613d802bc5d87a7be031aaf97996d96bd8af909.tar.xz |
talloc: change talloc destructor signature
Change talloc destructor so that they can never signal failure, and
don't return a status code. This makes our talloc copy even more
incompatible to upstream talloc, but on the other hand this is
preparation for getting rid of talloc entirely.
(The talloc replacement in the next commit won't allow the talloc_free
equivalent to fail, and the destructor return value would be useless.
But I don't want to change any mpv code either; the idea is that the
talloc replacement commit can be reverted for some time in order to
test whether the talloc replacement introduced a regression.)
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 6 | ||||
-rw-r--r-- | demux/demux_lavf.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/demux/demux.c b/demux/demux.c index 4fb121e29e..ba632218ec 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -116,12 +116,11 @@ static void ds_free_packs(struct demux_stream *ds) ds->eof = 0; } -static int packet_destroy(void *ptr) +static void packet_destroy(void *ptr) { struct demux_packet *dp = ptr; talloc_free(dp->avpacket); free(dp->allocation); - return 0; } static struct demux_packet *create_packet(size_t len) @@ -193,10 +192,9 @@ void free_demux_packet(struct demux_packet *dp) talloc_free(dp); } -static int destroy_avpacket(void *pkt) +static void destroy_avpacket(void *pkt) { av_free_packet(pkt); - return 0; } struct demux_packet *demux_copy_packet(struct demux_packet *dp) diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 1e071f20e2..9b8881fc8a 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -717,10 +717,9 @@ static void seek_reset(demuxer_t *demux) priv->num_packets = 0; } -static int destroy_avpacket(void *pkt) +static void destroy_avpacket(void *pkt) { av_free_packet(pkt); - return 0; } static int read_more_av_packets(demuxer_t *demux) |