changeset 28939:cbf56e4c9662

Check mpi type before returning an DR buffer in get_image, fixes jerkiness with MPEG1/2 and -dr -slices
author reimar
date Mon, 16 Mar 2009 14:25:03 +0000
parents 605aa9eec186
children 7406e7f30d4e
files libvo/vo_gl.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_gl.c	Mon Mar 16 10:29:30 2009 +0000
+++ b/libvo/vo_gl.c	Mon Mar 16 14:25:03 2009 +0000
@@ -765,6 +765,9 @@
     return VO_FALSE;
   }
   if (mpi->flags & MP_IMGFLAG_READABLE) return VO_FALSE;
+  if (mpi->type != MP_IMGTYPE_STATIC && mpi->type != MP_IMGTYPE_TEMP &&
+      (mpi->type != MP_IMGTYPE_NUMBERED || mpi->number))
+    return VO_FALSE;
   if (mesa_buffer) mpi->width = texture_width;
   else if (ati_hack) {
     mpi->width = texture_width;