Index: gstmpeg2dec.c
===================================================================
RCS file: /cvsroot/gstreamer/gst-plugins/ext/mpeg2dec/gstmpeg2dec.c,v
retrieving revision 1.46
diff -u -r1.46 gstmpeg2dec.c
--- gstmpeg2dec.c	16 Sep 2003 09:59:55 -0000	1.46
+++ gstmpeg2dec.c	6 Oct 2003 12:11:16 -0000
@@ -32,6 +32,8 @@
 */
 #ifndef MPEG2_RELEASE
 typedef picture_t mpeg2_picture_t;
+typedef gint mpeg2_state_t;
+#define STATE_BUFFER 0
 #endif
 
 GST_DEBUG_CATEGORY_EXTERN (GST_CAT_SEEK);
@@ -418,7 +420,7 @@
 static void
 gst_mpeg2dec_flush_decoder (GstMpeg2dec *mpeg2dec)
 {
-  gint state;
+  mpeg2_state_t state;
 
   if (mpeg2dec->decoder) {
     const mpeg2_info_t *info = mpeg2_info (mpeg2dec->decoder);
@@ -431,7 +433,7 @@
 	}
       }
     } 
-    while (state != -1);
+    while (state != STATE_BUFFER && state != -1);
   }
 }
 
@@ -443,7 +445,7 @@
   guint8 *data, *end;
   gint64 pts;
   const mpeg2_info_t *info;
-  gint state;
+  mpeg2_state_t state;
   gboolean done = FALSE;
 
   if (GST_IS_EVENT (buf)) {
@@ -656,7 +658,8 @@
         break;
       }
       /* need more data */
+      case STATE_BUFFER:
       case -1:
 	done = TRUE;
 	break;
       /* error */
