]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vcr1.c
More spelling errors patch by (Kevin Baragona (kevinmb500 gawab com>)
[ffmpeg] / libavcodec / vcr1.c
index 18e250dd6b4ef1a7692423d186ff284a98027625..442ad9136716ab4f1426ad13d2cda80af3f4ded3 100644 (file)
@@ -45,19 +45,12 @@ static int decode_frame(AVCodecContext *avctx,
     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;
@@ -150,9 +143,6 @@ static void common_init(AVCodecContext *avctx){
 }
 
 static int decode_init(AVCodecContext *avctx){
-    VCR1Context * const a = avctx->priv_data;
-    AVFrame *p= (AVFrame*)&a->picture;
-    int i;
  
     common_init(avctx);
     
@@ -161,22 +151,14 @@ static int decode_init(AVCodecContext *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",
@@ -185,7 +167,7 @@ AVCodec vcr1_decoder = {
     sizeof(VCR1Context),
     decode_init,
     NULL,
-    decode_end,
+    NULL,
     decode_frame,
     CODEC_CAP_DR1,
 };