comparison raw.c @ 2166:10d28761f78c libavcodec

give the user a chance to override codec_tag
author michael
date Thu, 12 Aug 2004 23:36:48 +0000
parents caacb3f9ee51
children d9c9b42767da
comparison
equal deleted inserted replaced
2165:5ca07515a309 2166:10d28761f78c
149 static int raw_init_encoder(AVCodecContext *avctx) 149 static int raw_init_encoder(AVCodecContext *avctx)
150 { 150 {
151 avctx->coded_frame = (AVFrame *)avctx->priv_data; 151 avctx->coded_frame = (AVFrame *)avctx->priv_data;
152 avctx->coded_frame->pict_type = FF_I_TYPE; 152 avctx->coded_frame->pict_type = FF_I_TYPE;
153 avctx->coded_frame->key_frame = 1; 153 avctx->coded_frame->key_frame = 1;
154 avctx->codec_tag = findFourCC(avctx->pix_fmt); 154 if(!avctx->codec_tag)
155 avctx->codec_tag = findFourCC(avctx->pix_fmt);
155 return 0; 156 return 0;
156 } 157 }
157 158
158 static int raw_encode(AVCodecContext *avctx, 159 static int raw_encode(AVCodecContext *avctx,
159 unsigned char *frame, int buf_size, void *data) 160 unsigned char *frame, int buf_size, void *data)