Mercurial > libavutil.hg
comparison fifo.c @ 686:b084f8cd043f libavutil
Remove more functions disabled by major version bump.
author | reimar |
---|---|
date | Sun, 08 Mar 2009 15:02:12 +0000 |
parents | 0bba880f7c22 |
children | bc81990848aa |
comparison
equal
deleted
inserted
replaced
685:634bcf10f5df | 686:b084f8cd043f |
---|---|
46 int av_fifo_size(AVFifoBuffer *f) | 46 int av_fifo_size(AVFifoBuffer *f) |
47 { | 47 { |
48 return (uint32_t)(f->wndx - f->rndx); | 48 return (uint32_t)(f->wndx - f->rndx); |
49 } | 49 } |
50 | 50 |
51 #if LIBAVUTIL_VERSION_MAJOR < 50 | |
52 void av_fifo_realloc(AVFifoBuffer *f, unsigned int new_size) { | |
53 av_fifo_realloc2(f, new_size); | |
54 } | |
55 #endif | |
56 | |
57 int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { | 51 int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { |
58 unsigned int old_size= f->end - f->buffer; | 52 unsigned int old_size= f->end - f->buffer; |
59 | 53 |
60 if(old_size < new_size){ | 54 if(old_size < new_size){ |
61 int len= av_fifo_size(f); | 55 int len= av_fifo_size(f); |
70 *f= *f2; | 64 *f= *f2; |
71 av_free(f2); | 65 av_free(f2); |
72 } | 66 } |
73 return 0; | 67 return 0; |
74 } | 68 } |
75 | |
76 #if LIBAVUTIL_VERSION_MAJOR < 50 | |
77 void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size) | |
78 { | |
79 av_fifo_generic_write(f, (void *)buf, size, NULL); | |
80 } | |
81 #endif | |
82 | 69 |
83 int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)) | 70 int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)) |
84 { | 71 { |
85 int total = size; | 72 int total = size; |
86 do { | 73 do { |