Company's wisdom:
authorIain Holmes <iain@prettypeople.org>
Sun, 26 Sep 2004 15:06:35 +0000 (15:06 +0000)
committerIain Holmes <iain@prettypeople.org>
Sun, 26 Sep 2004 15:06:35 +0000 (15:06 +0000)
Original commit message from CVS:
Company's wisdom:
Events should be passed on using the sinkpad's default handler not the src
Seek events only go upstream, so send a discont downstream instead.

ChangeLog
gst/wavenc/gstwavenc.c

index 083c8a1..d807c8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-26 Iain <iaingnome@gmail.com>
+
+       * gst/wavenc/gstwavenc.c (gst_wavenc_chain): Company says we need to
+       call the sinkpad's default event handler and not the srcpads. He also
+       says this is confusing :)
+       (gst_wavenc_stop_file): Company says that seek events only go upstream
+       we should send a discontinuous downstream instead.
+
 2004-09-25  Christian Schaller <christian@fluendo.com>
 
        * Update SPEC file to be usable in conjunction with Fedora Core,
index afb6067..a962be4 100644 (file)
@@ -259,7 +259,7 @@ gst_wavenc_stop_file (GstWavEnc * wavenc)
   GstEvent *event;
   GstBuffer *outbuf;
 
-  event = gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, 0);
+  event = gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, 0);
   gst_pad_push (wavenc->srcpad, GST_DATA (event));
 
   outbuf = gst_buffer_new_and_alloc (WAV_HEADER_LEN);
@@ -628,7 +628,7 @@ gst_wavenc_chain (GstPad * pad, GstData * _data)
           wavenc->flush_header = TRUE;
           gst_wavenc_setup (wavenc);
         }
-        gst_pad_event_default (wavenc->srcpad, GST_EVENT (buf));
+        gst_pad_event_default (wavenc->sinkpad, GST_EVENT (buf));
       }
     } else {
       gst_pad_event_default (wavenc->srcpad, GST_EVENT (buf));