]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rv10.c
dsputil: Move APE-specific bits into apedsp
[ffmpeg] / libavcodec / rv10.c
index 771d5a8485f2b1d2229af8a1d0bc34399ae495e3..f5533df06a2a314148e4aaaaab9481bf04e2caf7 100644 (file)
@@ -25,6 +25,8 @@
  * RV10/RV20 decoder
  */
 
+#include <inttypes.h>
+
 #include "libavutil/imgutils.h"
 
 #include "avcodec.h"
@@ -489,8 +491,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
 
     if (avctx->debug & FF_DEBUG_PICT_INFO) {
         av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", rv->sub_id,
-               avctx->extradata_size >= 4 ? ((uint32_t *) avctx->extradata)[0]
-                                          : -1);
+               avctx->extradata_size >= 4 ? ((int *) avctx->extradata)[0] : -1);
     }
 
     avctx->pix_fmt = AV_PIX_FMT_YUV420P;
@@ -564,7 +565,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf,
             return ret;
         ff_mpeg_er_frame_start(s);
     } else {
-        if (s->current_picture_ptr->f.pict_type != s->pict_type) {
+        if (s->current_picture_ptr->f->pict_type != s->pict_type) {
             av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
             return AVERROR_INVALIDDATA;
         }
@@ -738,11 +739,11 @@ static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         ff_MPV_frame_end(s);
 
         if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
-            if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0)
+            if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
                 return ret;
             ff_print_debug_info(s, s->current_picture_ptr);
         } else if (s->last_picture_ptr != NULL) {
-            if ((ret = av_frame_ref(pict, &s->last_picture_ptr->f)) < 0)
+            if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
                 return ret;
             ff_print_debug_info(s, s->last_picture_ptr);
         }
@@ -768,7 +769,10 @@ AVCodec ff_rv10_decoder = {
     .close          = rv10_decode_end,
     .decode         = rv10_decode_frame,
     .capabilities   = CODEC_CAP_DR1,
-    .pix_fmts       = ff_pixfmt_list_420,
+    .pix_fmts       = (const enum AVPixelFormat[]) {
+        AV_PIX_FMT_YUV420P,
+        AV_PIX_FMT_NONE
+    },
 };
 
 AVCodec ff_rv20_decoder = {
@@ -782,5 +786,8 @@ AVCodec ff_rv20_decoder = {
     .decode         = rv10_decode_frame,
     .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
     .flush          = ff_mpeg_flush,
-    .pix_fmts       = ff_pixfmt_list_420,
+    .pix_fmts       = (const enum AVPixelFormat[]) {
+        AV_PIX_FMT_YUV420P,
+        AV_PIX_FMT_NONE
+    },
 };