Mercurial > libavcodec.hg
comparison cyuv.c @ 1228:d63e0185a90f libavcodec
release buffer cleanup
author | michaelni |
---|---|
date | Tue, 06 May 2003 20:43:37 +0000 |
parents | 1e39f273ecd6 |
children | 8988af3ae1e8 |
comparison
equal
deleted
inserted
replaced
1227:184c480cefc3 | 1228:d63e0185a90f |
---|---|
96 } | 96 } |
97 | 97 |
98 /* pixel data starts 48 bytes in, after 3x16-byte tables */ | 98 /* pixel data starts 48 bytes in, after 3x16-byte tables */ |
99 stream_ptr = 48; | 99 stream_ptr = 48; |
100 | 100 |
101 if(s->frame.data[0]) | |
102 avctx->release_buffer(avctx, &s->frame); | |
103 | |
101 s->frame.reference = 0; | 104 s->frame.reference = 0; |
102 if(avctx->get_buffer(avctx, &s->frame) < 0) { | 105 if(avctx->get_buffer(avctx, &s->frame) < 0) { |
103 fprintf(stderr, "get_buffer() failed\n"); | 106 fprintf(stderr, "get_buffer() failed\n"); |
104 return -1; | 107 return -1; |
105 } | 108 } |
157 } | 160 } |
158 | 161 |
159 *data_size=sizeof(AVFrame); | 162 *data_size=sizeof(AVFrame); |
160 *(AVFrame*)data= s->frame; | 163 *(AVFrame*)data= s->frame; |
161 | 164 |
162 avctx->release_buffer(avctx, &s->frame); | |
163 | |
164 return buf_size; | 165 return buf_size; |
165 } | 166 } |
166 | 167 |
167 static int cyuv_decode_end(AVCodecContext *avctx) | 168 static int cyuv_decode_end(AVCodecContext *avctx) |
168 { | 169 { |