uint8_t *bytestream= buf;
int i, x, y;
- *data_size = 0;
-
- /* special case for last picture */
- if (buf_size == 0) {
- return 0;
- }
-
if(p->data[0])
avctx->release_buffer(avctx, p);
p->reference= 0;
if(avctx->get_buffer(avctx, p) < 0){
- fprintf(stderr, "get_buffer() failed\n");
+ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
p->pict_type= I_TYPE;
}
static int decode_init(AVCodecContext *avctx){
- VCR1Context * const a = avctx->priv_data;
- AVFrame *p= (AVFrame*)&a->picture;
- int i;
common_init(avctx);
return 0;
}
+#if 0
static int encode_init(AVCodecContext *avctx){
- VCR1Context * const a = avctx->priv_data;
- int i;
common_init(avctx);
return 0;
}
-
-static int decode_end(AVCodecContext *avctx){
- VCR1Context * const a = avctx->priv_data;
-
- avcodec_default_free_buffers(avctx);
-
- return 0;
-}
+#endif
AVCodec vcr1_decoder = {
"vcr1",
sizeof(VCR1Context),
decode_init,
NULL,
- decode_end,
+ NULL,
decode_frame,
CODEC_CAP_DR1,
};