video-frame: fix invalid plane id on video frame mapping error
authorArnaud Vrac <avrac@freebox.fr>
Wed, 25 Jul 2012 23:52:25 +0000 (01:52 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 25 Jul 2012 23:52:25 +0000 (01:52 +0200)
gst-libs/gst/video/video-frame.c

index 5070c67..5ddcd78 100644 (file)
@@ -126,10 +126,8 @@ no_metadata:
 frame_map_failed:
   {
     GST_ERROR ("failed to map video frame plane %d", i);
-    do {
-      i--;
+    while (--i >= 0)
       gst_video_meta_unmap (meta, i, &frame->map[i]);
-    } while (i > 0);
     return FALSE;
   }
 map_failed: