summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-02-19 03:23:50 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-02-19 03:23:50 +0200
commite46317a1db077a7f92ea5db7bb76e6cc899f1a64 (patch)
tree077078d79610f76cce2e38217f452a4da2b9287c /libmpcodecs
parent186e5a998c8424b3c850b62d6f5755a0928cd64c (diff)
parent908286b437f3b8c8564db3c77456d5350588fb17 (diff)
downloadmpv-e46317a1db077a7f92ea5db7bb76e6cc899f1a64.tar.bz2
mpv-e46317a1db077a7f92ea5db7bb76e6cc899f1a64.tar.xz
Merge svn changes up to r28655
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c1
-rw-r--r--libmpcodecs/vf_vo.c2
-rw-r--r--libmpcodecs/vfcap.h2
3 files changed, 5 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index c70da3a9f3..69574e399e 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -560,6 +560,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
mpi= mpcodecs_get_image(sh, type, flags,
(width+align)&(~align), (height+align)&(~align));
+ if (!mpi) return -1;
// ok, let's see what did we get:
if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK &&
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index 09425adcb0..2e4257fb21 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -33,6 +33,7 @@ struct vf_priv_s {
#define video_out (vf->priv->vo)
static int query_format(struct vf_instance* vf, unsigned int fmt); /* forward declaration */
+static void draw_slice(struct vf_instance *vf, unsigned char **src, int *stride, int w,int h, int x, int y);
static int config(struct vf_instance* vf,
int width, int height, int d_width, int d_height,
@@ -60,6 +61,7 @@ static int config(struct vf_instance* vf,
// save vo's stride capability for the wanted colorspace:
vf->default_caps=query_format(vf,outfmt);
+ vf->draw_slice = (vf->default_caps & VOCAP_NOSLICES) ? NULL : draw_slice;
if (vo_config(video_out, width, height, d_width, d_height, flags, "MPlayer", outfmt))
return 0;
diff --git a/libmpcodecs/vfcap.h b/libmpcodecs/vfcap.h
index 9745a5c9bd..158928d924 100644
--- a/libmpcodecs/vfcap.h
+++ b/libmpcodecs/vfcap.h
@@ -33,5 +33,7 @@
#define VFCAP_EOSD 0x2000
// filter will draw EOSD at screen resolution (without scaling)
#define VFCAP_EOSD_UNSCALED 0x4000
+// used by libvo and vf_vo, indicates the VO does not support draw_slice for this format
+#define VOCAP_NOSLICES 0x8000
#endif /* MPLAYER_VFCAP_H */