--- gst-ffmpeg-0.8.2-orig/ext/ffmpeg/gstffmpegdec.c	2004-10-09 12:22:07.000000000 -0400
+++ gst-ffmpeg-0.8.2/ext/ffmpeg/gstffmpegdec.c	2004-10-12 12:49:25.000000000 -0400
@@ -423,13 +423,17 @@
               ffmpegdec->context->width, ffmpegdec->context->height);
 
           /* note that ffmpeg sometimes gets the FPS wrong */
-          if (GST_CLOCK_TIME_IS_VALID (expected_ts)) {
+          if (GST_CLOCK_TIME_IS_VALID (expected_ts) && 
+              ffmpegdec->context->frame_rate > 0) {
             GST_BUFFER_TIMESTAMP (outbuf) = expected_ts;
             GST_BUFFER_DURATION (outbuf) = GST_SECOND *
                 ffmpegdec->context->frame_rate_base /
                 ffmpegdec->context->frame_rate;
             expected_ts += GST_BUFFER_DURATION (outbuf);
           }
+          else {
+            GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (inbuf);
+          }
         }
         break;
 
