diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index 9328f9c..39f5c6c 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -858,6 +858,10 @@ new_packet_cb (guint8 * data, guint len, void *user_data, gint64 new_pcr)
       chunk_bytes = gst_adapter_available (mux->adapter);
 
       if (G_UNLIKELY (chunk_bytes)) {
+        /* add current buffer to adapter */
+        gst_adapter_push (mux->adapter, buf);
+        chunk_bytes = gst_adapter_available (mux->adapter);
+
         /* calculate rate based on latest and previous pcr values */
         ts_rate = ((chunk_bytes * STANDARD_TIME_CLOCK) / (new_pcr -
                 mux->previous_pcr));
diff --git a/gst/mpegtsmux/tsmux/tsmux.c b/gst/mpegtsmux/tsmux/tsmux.c
index 1a50e72..1195120 100644
--- a/gst/mpegtsmux/tsmux/tsmux.c
+++ b/gst/mpegtsmux/tsmux/tsmux.c
@@ -887,7 +887,7 @@ tsmux_write_pat (TsMux * mux)
   GList *cur;
   TsMuxSection *pat = &mux->pat;
 
-  if (mux->pat_changed) {
+  /*if (mux->pat_changed) */{
     /* program_association_section ()
      * table_id                                   8   uimsbf
      * section_syntax_indicator                   1   bslbf
