comparison pcm.c @ 925:7fccaa0d699d libavcodec

AVVideoFrame -> AVFrame
author michaelni
date Mon, 09 Dec 2002 12:03:43 +0000
parents 5a8f80522cf8
children 48349e11c9b2
comparison
equal deleted inserted replaced
924:3814e9115672 925:7fccaa0d699d
126 linear_to_ulaw_ref++; 126 linear_to_ulaw_ref++;
127 break; 127 break;
128 default: 128 default:
129 break; 129 break;
130 } 130 }
131
132 avctx->coded_frame= avcodec_alloc_frame();
133 avctx->coded_frame->key_frame= 1;
134
131 return 0; 135 return 0;
132 } 136 }
133 137
134 static int pcm_encode_close(AVCodecContext *avctx) 138 static int pcm_encode_close(AVCodecContext *avctx)
135 { 139 {
140 av_freep(&avctx->coded_frame);
141
136 switch(avctx->codec->id) { 142 switch(avctx->codec->id) {
137 case CODEC_ID_PCM_ALAW: 143 case CODEC_ID_PCM_ALAW:
138 if (--linear_to_alaw_ref == 0) 144 if (--linear_to_alaw_ref == 0)
139 av_free(linear_to_alaw); 145 av_free(linear_to_alaw);
140 break; 146 break;
235 } 241 }
236 break; 242 break;
237 default: 243 default:
238 return -1; 244 return -1;
239 } 245 }
240 avctx->key_frame = 1;
241 //avctx->frame_size = (dst - frame) / (sample_size * avctx->channels); 246 //avctx->frame_size = (dst - frame) / (sample_size * avctx->channels);
242 247
243 return dst - frame; 248 return dst - frame;
244 } 249 }
245 250