Revision 8ab4861c libavcodec/utils.c

View differences:

libavcodec/utils.c
59 59

  
60 60
static int volatile entangled_thread_counter=0;
61 61

  
62
/**
63
 * realloc which does nothing if the block is large enough
64
 */
65 62
void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
66 63
{
67 64
    if(min_size < *size)
......
76 73
static unsigned int allocated_static = 0;
77 74
static void** array_static = NULL;
78 75

  
79
/**
80
 * allocation of static arrays - do not use for normal allocation.
81
 */
82 76
void *av_mallocz_static(unsigned int size)
83 77
{
84 78
    void *ptr = av_mallocz(size);
......
93 87
    return ptr;
94 88
}
95 89

  
96
/**
97
 * same as above, but does realloc
98
 */
99

  
100 90
void *av_realloc_static(void *ptr, unsigned int size)
101 91
{
102 92
    int i;
......
113 103

  
114 104
}
115 105

  
116
/**
117
 * free all static arrays and reset pointers to 0.
118
 */
119 106
void av_free_static(void)
120 107
{
121 108
    while(last_static){
......
938 925
}
939 926
#endif
940 927

  
941

  
942
/* decode a subtitle message. return -1 if error, otherwise return the
943
   *number of bytes used. If no subtitle could be decompressed,
944
   *got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
945 928
int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
946 929
                            int *got_sub_ptr,
947 930
                            const uint8_t *buf, int buf_size)
......
1206 1189
    init_crcs();
1207 1190
}
1208 1191

  
1209
/**
1210
 * Flush buffers, should be called when seeking or when switching to a different stream.
1211
 */
1212 1192
void avcodec_flush_buffers(AVCodecContext *avctx)
1213 1193
{
1214 1194
    if(avctx->codec->flush)

Also available in: Unified diff