xine-lib: xine-lib-1.2.13/src/video_dec/libmpeg2new/libmpeg2/alloc.c File Reference

xine-lib 1.2.13-20230125hg15249

Functions | Variables
alloc.c File Reference
`#include <stdlib.h>`
`#include <inttypes.h>`
`#include "../include/mpeg2.h"`

## Functions
void * | mpeg2_malloc (unsigned size, mpeg2_alloc_t reason)
void | mpeg2_free (void *buf)
void | mpeg2_malloc_hooks (void *malloc(unsigned, mpeg2_alloc_t), int free(void *))

## Variables
static void *(* | malloc_hook )(unsigned size, mpeg2_alloc_t reason) = NULL
static int(* | free_hook )(void *buf) = NULL

## Function Documentation

## ◆ mpeg2_free()

void mpeg2_free | ( | void * | buf | ) |

References free_hook.

Referenced by mpeg2_close(), and mpeg2_header_state_init().

## ◆ mpeg2_malloc()

void * mpeg2_malloc | ( | unsigned | size,
|  | mpeg2_alloc_t | reason )

References malloc_hook, and NULL.

Referenced by mpeg2_header_picture_finalize(), and mpeg2_init().

## ◆ mpeg2_malloc_hooks()

void mpeg2_malloc_hooks | ( | void * | mallocunsigned, mpeg2_alloc_t,
|  | int | freevoid * )

References free_hook, and malloc_hook.

## Variable Documentation

## ◆ free_hook

int(* free_hook) (void *buf) | ( | void * | buf | ) | = NULL
| static

Referenced by mpeg2_free(), and mpeg2_malloc_hooks().

## ◆ malloc_hook

void *(* malloc_hook) (unsigned size, mpeg2_alloc_t reason) | ( | unsigned | size,
|  | mpeg2_alloc_t | reason ) = NULL
| static

Referenced by mpeg2_malloc(), and mpeg2_malloc_hooks().