summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_lavc.c
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-09 12:36:04 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-09 12:36:04 +0000
commit26e4189539de25f9607d1d4c5d0fa3c2e4e710da (patch)
tree1c3ab241a088fb92fa68c01d0a75807967db35c2 /libmpcodecs/vf_lavc.c
parent67c0bb02e8bb36ca30f254feafb51dde2e167b0f (diff)
downloadmpv-26e4189539de25f9607d1d4c5d0fa3c2e4e710da.tar.bz2
mpv-26e4189539de25f9607d1d4c5d0fa3c2e4e710da.tar.xz
AVVideoFrame -> AVFrame
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8414 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_lavc.c')
-rw-r--r--libmpcodecs/vf_lavc.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c
index fe47c8f90c..d722c954b5 100644
--- a/libmpcodecs/vf_lavc.c
+++ b/libmpcodecs/vf_lavc.c
@@ -25,13 +25,22 @@
#error we dont support libavcodec prior to build 4641, get the latest libavcodec CVS
#endif
+#if LIBAVCODEC_BUILD < 4645
+#warning your version of libavcodec is old, u might want to get a newer one
+#endif
+
+#if LIBAVCODEC_BUILD < 4645
+#define AVFrame AVVideoFrame
+#define coded_frame coded_picture
+#endif
+
extern int avcodec_inited;
struct vf_priv_s {
unsigned char* outbuf;
int outbuf_size;
AVCodecContext* context;
- AVVideoFrame* pic;
+ AVFrame* pic;
AVCodec* codec;
vo_mpegpes_t pes;
};
@@ -85,7 +94,7 @@ static int config(struct vf_instance_s* vf,
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
mp_image_t* dmpi;
int out_size;
- AVVideoFrame *pic= vf->priv->pic;
+ AVFrame *pic= vf->priv->pic;
pic->data[0]=mpi->planes[0];
pic->data[1]=mpi->planes[1];
@@ -148,7 +157,11 @@ static int open(vf_instance_t *vf, char* args){
}
vf->priv->context=avcodec_alloc_context();
- vf->priv->pic=avcodec_alloc_picture();
+#if LIBAVCODEC_BUILD >= 4645
+ vf->priv->pic = avcodec_alloc_frame();
+#else
+ vf->priv->pic = avcodec_alloc_picture();
+#endif
// TODO: parse args ->
if(args) sscanf(args, "%d:%f", &p_quality, &p_fps);