diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 4bf0619..2564a74 100755
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -1733,8 +1733,18 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force)
         }
         stream->first_buffer = FALSE;
       }
+      /* check if timestamp is valid when duration is valid */
+      if (demux->segment.duration > 0
+          && GST_BUFFER_PTS (payload->buf) > demux->segment.duration) {
+        GST_WARNING_OBJECT (demux,
+            "skipped a frame with an abnormal timestamp (ts=%" GST_TIME_FORMAT
+            ", total duration=%" GST_TIME_FORMAT,
+            GST_TIME_ARGS (GST_BUFFER_PTS (payload->buf)),
+            GST_TIME_ARGS (demux->segment.duration));
+        gst_buffer_unref (payload->buf);
+      } else
+        ret = gst_pad_push (stream->pad, payload->buf);
 
-      ret = gst_pad_push (stream->pad, payload->buf);
       ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
     } else {
       gst_buffer_unref (payload->buf);
