[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    [gst-devel] [patch] Don't push asf packets if they are not complete
From:       ja2morri () csclub ! uwaterloo ! ca (James Morrison)
Date:       2004-10-23 22:08:58
Message-ID: 20041023220858.83500A8700 () perpugilliam ! csclub ! uwaterloo ! ca
[Download RAW message or body]


 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


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic