comparison mpeg12.c @ 558:5690779adf16 libavcodec

dr1
author michaelni
date Tue, 16 Jul 2002 00:48:29 +0000
parents 762c67fd4078
children 7e7a7282608c
comparison
equal deleted inserted replaced
557:c1e1be461662 558:5690779adf16
1229 1229
1230 static int mpeg_decode_init(AVCodecContext *avctx) 1230 static int mpeg_decode_init(AVCodecContext *avctx)
1231 { 1231 {
1232 Mpeg1Context *s = avctx->priv_data; 1232 Mpeg1Context *s = avctx->priv_data;
1233 1233
1234 s->mpeg_enc_ctx.flags= avctx->flags;
1234 common_init(&s->mpeg_enc_ctx); 1235 common_init(&s->mpeg_enc_ctx);
1235 1236
1236 s->header_state = 0xff; 1237 s->header_state = 0xff;
1237 s->mpeg_enc_ctx_allocated = 0; 1238 s->mpeg_enc_ctx_allocated = 0;
1238 s->buffer_size = PICTURE_BUFFER_SIZE; 1239 s->buffer_size = PICTURE_BUFFER_SIZE;
1240 s->buf_ptr = s->buffer; 1241 s->buf_ptr = s->buffer;
1241 s->mpeg_enc_ctx.picture_number = 0; 1242 s->mpeg_enc_ctx.picture_number = 0;
1242 s->repeat_field = 0; 1243 s->repeat_field = 0;
1243 s->mpeg_enc_ctx.codec_id= avctx->codec->id; 1244 s->mpeg_enc_ctx.codec_id= avctx->codec->id;
1244 avctx->mbskip_table= s->mpeg_enc_ctx.mbskip_table; 1245 avctx->mbskip_table= s->mpeg_enc_ctx.mbskip_table;
1245 s->mpeg_enc_ctx.flags= avctx->flags;
1246 return 0; 1246 return 0;
1247 } 1247 }
1248 1248
1249 /* return the 8 bit start code value and update the search 1249 /* return the 8 bit start code value and update the search
1250 state. Return -1 if no start code found */ 1250 state. Return -1 if no start code found */
1762 sizeof(Mpeg1Context), 1762 sizeof(Mpeg1Context),
1763 mpeg_decode_init, 1763 mpeg_decode_init,
1764 NULL, 1764 NULL,
1765 mpeg_decode_end, 1765 mpeg_decode_end,
1766 mpeg_decode_frame, 1766 mpeg_decode_frame,
1767 CODEC_CAP_DR1,
1767 }; 1768 };