diff libmpcodecs/vd_ffmpeg.c @ 35707:4ba6b8d3197e

Replace PixelFormat and PIX_FMT_FOO by their AV_-prefixed counterparts.
author diego
date Sun, 20 Jan 2013 18:18:33 +0000
parents 26a91d76cfda
children 8517826b0dbd
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sun Jan 20 18:18:31 2013 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Jan 20 18:18:33 2013 +0000
@@ -58,7 +58,7 @@
 typedef struct {
     AVCodecContext *avctx;
     AVFrame *pic;
-    enum PixelFormat pix_fmt;
+    enum AVPixelFormat pix_fmt;
     int do_slices;
     int do_dr1;
     int nonref_dr; ///< allow dr only for non-reference frames
@@ -80,8 +80,8 @@
 static void draw_slice(struct AVCodecContext *s, const AVFrame *src, int offset[4],
                        int y, int type, int height);
 
-static enum PixelFormat get_format(struct AVCodecContext *avctx,
-                                   const enum PixelFormat *pix_fmt);
+static enum AVPixelFormat get_format(struct AVCodecContext *avctx,
+                                     const enum AVPixelFormat *pix_fmt);
 
 static int lavc_param_workaround_bugs= FF_BUG_AUTODETECT;
 static int lavc_param_error_resilience=2;
@@ -188,7 +188,9 @@
     return CONTROL_UNKNOWN;
 }
 
-static void set_format_params(struct AVCodecContext *avctx, enum PixelFormat fmt){
+static void set_format_params(struct AVCodecContext *avctx,
+                              enum AVPixelFormat fmt)
+{
     int imgfmt;
     if (fmt == PIX_FMT_NONE)
         return;
@@ -471,7 +473,8 @@
 }
 
 
-static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){
+static int init_vo(sh_video_t *sh, enum AVPixelFormat pix_fmt)
+{
     vd_ffmpeg_ctx *ctx = sh->context;
     AVCodecContext *avctx = ctx->avctx;
     float aspect= av_q2d(avctx->sample_aspect_ratio) * avctx->width / avctx->height;
@@ -959,9 +962,10 @@
     return mpi;
 }
 
-static enum PixelFormat get_format(struct AVCodecContext *avctx,
-                                    const enum PixelFormat *fmt){
-    enum PixelFormat selected_format;
+static enum AVPixelFormat get_format(struct AVCodecContext *avctx,
+                                     const enum AVPixelFormat *fmt)
+{
+    enum AVPixelFormat selected_format;
     int imgfmt;
     sh_video_t *sh = avctx->opaque;
     int i;