]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cyuv.c
Use reget_buffer instead of get_buffer. Fixes issue1367.
[ffmpeg] / libavcodec / cyuv.c
index 26bf7550dbe99bc68c01192b8cd7da46ccad1183..41be0c661b2364057dd8c95f88d9358aae44379e 100644 (file)
  */
 
 /**
- * @file cyuv.c
+ * @file libavcodec/cyuv.c
  * Creative YUV (CYUV) Video Decoder.
  */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
 #include "avcodec.h"
 #include "dsputil.h"
@@ -60,8 +59,10 @@ static av_cold int cyuv_decode_init(AVCodecContext *avctx)
 
 static int cyuv_decode_frame(AVCodecContext *avctx,
                              void *data, int *data_size,
-                             const uint8_t *buf, int buf_size)
+                             AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     CyuvDecodeContext *s=avctx->priv_data;
 
     unsigned char *y_plane;
@@ -163,13 +164,6 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
-static av_cold int cyuv_decode_end(AVCodecContext *avctx)
-{
-/*    CyuvDecodeContext *s = avctx->priv_data;*/
-
-    return 0;
-}
-
 AVCodec cyuv_decoder = {
     "cyuv",
     CODEC_TYPE_VIDEO,
@@ -177,10 +171,10 @@ AVCodec cyuv_decoder = {
     sizeof(CyuvDecodeContext),
     cyuv_decode_init,
     NULL,
-    cyuv_decode_end,
+    NULL,
     cyuv_decode_frame,
     CODEC_CAP_DR1,
     NULL,
-    .long_name = "Creative YUV (CYUV)",
+    .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
 };