comparison mpegvideo.c @ 9200:7b62de9c383d libavcodec

Rename hwaccel_data_private to hwaccel_picture_private.
author gb
date Fri, 20 Mar 2009 12:04:58 +0000
parents 3a54ad453dbf
children b5c30624da37
comparison
equal deleted inserted replaced
9199:ea0e5e9a520f 9200:7b62de9c383d
168 * Releases a frame buffer 168 * Releases a frame buffer
169 */ 169 */
170 static void free_frame_buffer(MpegEncContext *s, Picture *pic) 170 static void free_frame_buffer(MpegEncContext *s, Picture *pic)
171 { 171 {
172 s->avctx->release_buffer(s->avctx, (AVFrame*)pic); 172 s->avctx->release_buffer(s->avctx, (AVFrame*)pic);
173 av_freep(&pic->hwaccel_data_private); 173 av_freep(&pic->hwaccel_picture_private);
174 } 174 }
175 175
176 /** 176 /**
177 * Allocates a frame buffer 177 * Allocates a frame buffer
178 */ 178 */
179 static int alloc_frame_buffer(MpegEncContext *s, Picture *pic) 179 static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
180 { 180 {
181 int r; 181 int r;
182 182
183 if (s->avctx->hwaccel) { 183 if (s->avctx->hwaccel) {
184 assert(!pic->hwaccel_data_private); 184 assert(!pic->hwaccel_picture_private);
185 if (s->avctx->hwaccel->priv_data_size) { 185 if (s->avctx->hwaccel->priv_data_size) {
186 pic->hwaccel_data_private = av_mallocz(s->avctx->hwaccel->priv_data_size); 186 pic->hwaccel_picture_private = av_mallocz(s->avctx->hwaccel->priv_data_size);
187 if (!pic->hwaccel_data_private) { 187 if (!pic->hwaccel_picture_private) {
188 av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n"); 188 av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n");
189 return -1; 189 return -1;
190 } 190 }
191 } 191 }
192 } 192 }
193 193
194 r = s->avctx->get_buffer(s->avctx, (AVFrame*)pic); 194 r = s->avctx->get_buffer(s->avctx, (AVFrame*)pic);
195 195
196 if (r<0 || !pic->age || !pic->type || !pic->data[0]) { 196 if (r<0 || !pic->age || !pic->type || !pic->data[0]) {
197 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (%d %d %d %p)\n", r, pic->age, pic->type, pic->data[0]); 197 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (%d %d %d %p)\n", r, pic->age, pic->type, pic->data[0]);
198 av_freep(&pic->hwaccel_data_private); 198 av_freep(&pic->hwaccel_picture_private);
199 return -1; 199 return -1;
200 } 200 }
201 201
202 if (s->linesize && (s->linesize != pic->linesize[0] || s->uvlinesize != pic->linesize[1])) { 202 if (s->linesize && (s->linesize != pic->linesize[0] || s->uvlinesize != pic->linesize[1])) {
203 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (stride changed)\n"); 203 av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (stride changed)\n");