--- /home/silentm/Development/GStreamer/gst-plugins-good/gst/rtp/gstrtpjpegpay.c	2011-08-22 09:46:07.532045208 -0400
+++ /home/silentm/Development/GStreamer/gst-plugins-good-patched/gst/rtp/gstrtpjpegpay.c	2011-08-23 12:07:24.000000000 -0400
@@ -666,8 +666,9 @@
         jpeg_header_size = offset + gst_rtp_jpeg_pay_header_size (data, offset);
         break;
       case JPEG_MARKER_EOI:
+        ret = GST_FLOW_OK;
         GST_WARNING_OBJECT (pay, "EOI reached before SOS!");
-        break;
+        goto eoi;
       case JPEG_MARKER_SOI:
         GST_LOG_OBJECT (pay, "SOI found");
         break;
@@ -812,6 +813,7 @@
       bytes_left -= quant_data_size;
       quant_data_size = 0;
     }
+
     GST_LOG_OBJECT (pay, "sending payload size %d", payload_size);
 
     if (pay->buffer_list) {
@@ -844,6 +846,8 @@
     ret = gst_basertppayload_push_list (basepayload, list);
   }
 
+eoi:
+
   gst_buffer_unref (buffer);
 
   return ret;
