[gst-devel] [patch] Don't push asf packets if they are not complete

James Morrison ja2morri at csclub.uwaterloo.ca
Sun Oct 24 03:06:11 CEST 2004


 Hi,

  This patch stops asfdemux from pushing packets that aren't complete on to
the decoders.

Jim
Index: gstasfdemux.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins/gst/asfdemux/gstasfdemux.c,v
retrieving revision 1.75
diff -u -p -r1.75 gstasfdemux.c
--- gstasfdemux.c	1 Oct 2004 10:50:57 -0000	1.75
+++ gstasfdemux.c	23 Oct 2004 22:01:02 -0000
@@ -1223,6 +1223,11 @@ gst_asf_demux_process_chunk (GstASFDemux
 
   if (stream->frag_offset < segment_info->segment_size) {
     /* We don't have the whole packet yet */
+  } else if (got_bytes < segment_info->chunk_size) {
+    /* We didn't get the entire chunk, so don't push it down the pipeline. */
+    gst_buffer_unref (stream->payload);
+    stream->payload = NULL;
+    stream->frag_offset = 0;
   } else {
     /* We have the whole packet now so we should push the packet to
        the src pad now. First though we should check if we need to do




More information about the gstreamer-devel mailing list