diff --git a/mythtv/libs/libmythtv/recorders/asirecorder.cpp b/mythtv/libs/libmythtv/recorders/asirecorder.cpp
index b6cb4df..44e445f 100644
--- a/mythtv/libs/libmythtv/recorders/asirecorder.cpp
+++ b/mythtv/libs/libmythtv/recorders/asirecorder.cpp
@@ -62,6 +62,17 @@ void ASIRecorder::SetOption(const QString &name, int value)
         DTVRecorder::SetOption(name, value);
 }
 
+void ASIRecorder::StartNewFile(void)
+{
+    // Make sure the first things in the file are a PAT & PMT
+    bool tmp = _wait_for_keyframe_option;
+    _wait_for_keyframe_option = false;
+    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+    _wait_for_keyframe_option = tmp;
+}
+
+
 void ASIRecorder::run(void)
 {
     if (!Open())
@@ -99,12 +110,7 @@ void ASIRecorder::run(void)
     if (m_channel && (m_channel->GetSIStandard() == "dvb"))
         _stream_data->AddListeningPID(DVB_TDT_PID);
 
-    // Make sure the first things in the file are a PAT & PMT
-    bool tmp = _wait_for_keyframe_option;
-    _wait_for_keyframe_option = false;
-    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
-    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
-    _wait_for_keyframe_option = tmp;
+    StartNewFile();
 
     _stream_data->AddAVListener(this);
     _stream_data->AddWritingListener(this);
diff --git a/mythtv/libs/libmythtv/recorders/asirecorder.h b/mythtv/libs/libmythtv/recorders/asirecorder.h
index a973f9d..22d52b9 100644
--- a/mythtv/libs/libmythtv/recorders/asirecorder.h
+++ b/mythtv/libs/libmythtv/recorders/asirecorder.h
@@ -69,6 +69,7 @@ class ASIRecorder : public DTVRecorder
     bool Open(void);
     bool IsOpen(void) const;
     void Close(void);
+    void StartNewFile(void);
 
   private:
     ASIChannel       *m_channel;
diff --git a/mythtv/libs/libmythtv/recorders/cetonrecorder.cpp b/mythtv/libs/libmythtv/recorders/cetonrecorder.cpp
index f7aacf4..918c2fe 100644
--- a/mythtv/libs/libmythtv/recorders/cetonrecorder.cpp
+++ b/mythtv/libs/libmythtv/recorders/cetonrecorder.cpp
@@ -46,6 +46,16 @@ void CetonRecorder::Close(void)
     LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end");
 }
 
+void CetonRecorder::StartNewFile(void)
+{
+    // Make sure the first things in the file are a PAT & PMT
+    bool tmp = _wait_for_keyframe_option;
+    _wait_for_keyframe_option = false;
+    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+    _wait_for_keyframe_option = tmp;
+}
+
 void CetonRecorder::run(void)
 {
     LOG(VB_RECORD, LOG_INFO, LOC + "run -- begin");
@@ -65,12 +75,7 @@ void CetonRecorder::run(void)
         recordingWait.wakeAll();
     }
 
-    // Make sure the first things in the file are a PAT & PMT
-    bool tmp = _wait_for_keyframe_option;
-    _wait_for_keyframe_option = false;
-    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
-    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
-    _wait_for_keyframe_option = tmp;
+    StartNewFile();
 
     _stream_data->AddAVListener(this);
     _stream_data->AddWritingListener(this);
diff --git a/mythtv/libs/libmythtv/recorders/cetonrecorder.h b/mythtv/libs/libmythtv/recorders/cetonrecorder.h
index fe2d176..8233d46 100644
--- a/mythtv/libs/libmythtv/recorders/cetonrecorder.h
+++ b/mythtv/libs/libmythtv/recorders/cetonrecorder.h
@@ -26,6 +26,7 @@ class CetonRecorder : public DTVRecorder
 
     bool Open(void);
     void Close(void);
+    void StartNewFile(void);
 
     bool IsOpen(void) const { return _stream_handler; }
 
diff --git a/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp b/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
index 0c30b10..2b26342 100644
--- a/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
+++ b/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
@@ -87,6 +87,11 @@ DTVRecorder::DTVRecorder(TVRec *rec) :
 {
     SetPositionMapType(MARK_GOP_BYFRAME);
     _payload_buffer.reserve(TSPacket::kSize * (50 + 1));
+
+    memset(_stream_id,  0, sizeof(_stream_id));
+    memset(_pid_status, 0, sizeof(_pid_status));
+    memset(_continuity_counter, 0xff, sizeof(_continuity_counter));
+
     ResetForNewFile();
 }
 
@@ -191,10 +196,6 @@ void DTVRecorder::ResetForNewFile(void)
     //_recording
     _error                      = QString();
 
-    memset(_stream_id,  0, sizeof(_stream_id));
-    memset(_pid_status, 0, sizeof(_pid_status));
-    memset(_continuity_counter, 0xff, sizeof(_continuity_counter));
-
     _progressive_sequence       = 0;
     _repeat_pict                = 0;
 
@@ -204,7 +205,6 @@ void DTVRecorder::ResetForNewFile(void)
     positionMapDelta.clear();
     durationMap.clear();
     durationMapDelta.clear();
-    _payload_buffer.clear();
 
     locker.unlock();
     ClearStatistics();
diff --git a/mythtv/libs/libmythtv/recorders/dvbrecorder.cpp b/mythtv/libs/libmythtv/recorders/dvbrecorder.cpp
index c1b66d5..92a05e0 100644
--- a/mythtv/libs/libmythtv/recorders/dvbrecorder.cpp
+++ b/mythtv/libs/libmythtv/recorders/dvbrecorder.cpp
@@ -72,6 +72,16 @@ void DVBRecorder::Close(void)
     LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end");
 }
 
+void DVBRecorder::StartNewFile(void)
+{
+    // Make sure the first things in the file are a PAT & PMT
+    bool tmp = _wait_for_keyframe_option;
+    _wait_for_keyframe_option = false;
+    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+    _wait_for_keyframe_option = tmp;
+}
+
 void DVBRecorder::run(void)
 {
     if (!Open())
@@ -92,12 +102,7 @@ void DVBRecorder::run(void)
     if (_channel && (_channel->GetSIStandard() == "dvb"))
         _stream_data->AddListeningPID(DVB_TDT_PID);
 
-    // Make sure the first things in the file are a PAT & PMT
-    bool tmp = _wait_for_keyframe_option;
-    _wait_for_keyframe_option = false;
-    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
-    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
-    _wait_for_keyframe_option = tmp;
+    StartNewFile();
 
     _stream_data->AddAVListener(this);
     _stream_data->AddWritingListener(this);
diff --git a/mythtv/libs/libmythtv/recorders/dvbrecorder.h b/mythtv/libs/libmythtv/recorders/dvbrecorder.h
index eb0b5f8..e82c2fe 100644
--- a/mythtv/libs/libmythtv/recorders/dvbrecorder.h
+++ b/mythtv/libs/libmythtv/recorders/dvbrecorder.h
@@ -28,6 +28,7 @@ class DVBRecorder : public DTVRecorder
     bool Open(void);
     bool IsOpen(void) const;
     void Close(void);
+    void StartNewFile(void);
 
   private:
     bool PauseAndWait(int timeout = 100);
diff --git a/mythtv/libs/libmythtv/recorders/hdhrrecorder.cpp b/mythtv/libs/libmythtv/recorders/hdhrrecorder.cpp
index c8e1436..f84ac1e 100644
--- a/mythtv/libs/libmythtv/recorders/hdhrrecorder.cpp
+++ b/mythtv/libs/libmythtv/recorders/hdhrrecorder.cpp
@@ -47,6 +47,16 @@ void HDHRRecorder::Close(void)
     LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end");
 }
 
+void HDHRRecorder::StartNewFile(void)
+{
+    // Make sure the first things in the file are a PAT & PMT
+    bool tmp = _wait_for_keyframe_option;
+    _wait_for_keyframe_option = false;
+    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+    _wait_for_keyframe_option = tmp;
+}
+
 void HDHRRecorder::run(void)
 {
     LOG(VB_RECORD, LOG_INFO, LOC + "run -- begin");
@@ -66,12 +76,7 @@ void HDHRRecorder::run(void)
         recordingWait.wakeAll();
     }
 
-    // Make sure the first things in the file are a PAT & PMT
-    bool tmp = _wait_for_keyframe_option;
-    _wait_for_keyframe_option = false;
-    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
-    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
-    _wait_for_keyframe_option = tmp;
+    StartNewFile();
 
     _stream_data->AddAVListener(this);
     _stream_data->AddWritingListener(this);
diff --git a/mythtv/libs/libmythtv/recorders/hdhrrecorder.h b/mythtv/libs/libmythtv/recorders/hdhrrecorder.h
index 44b3fc1..7523e37 100644
--- a/mythtv/libs/libmythtv/recorders/hdhrrecorder.h
+++ b/mythtv/libs/libmythtv/recorders/hdhrrecorder.h
@@ -26,6 +26,7 @@ class HDHRRecorder : public DTVRecorder
     bool Open(void);
     bool IsOpen(void) const { return _stream_handler; }
     void Close(void);
+    void StartNewFile(void);
 
     QString GetSIStandard(void) const;
 
diff --git a/mythtv/libs/libmythtv/recorders/iptvrecorder.cpp b/mythtv/libs/libmythtv/recorders/iptvrecorder.cpp
index 39a35b1..d9be192 100644
--- a/mythtv/libs/libmythtv/recorders/iptvrecorder.cpp
+++ b/mythtv/libs/libmythtv/recorders/iptvrecorder.cpp
@@ -91,6 +91,16 @@ bool IPTVRecorder::PauseAndWait(int timeout)
     return IsPaused(true);
 }
 
+void IPTVRecorder::StartNewFile(void)
+{
+    // Make sure the first things in the file are a PAT & PMT
+    bool tmp = _wait_for_keyframe_option;
+    _wait_for_keyframe_option = false;
+    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
+    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
+    _wait_for_keyframe_option = tmp;
+}
+
 void IPTVRecorder::run(void)
 {
     LOG(VB_RECORD, LOG_INFO, LOC + "run -- begin");
@@ -109,12 +119,7 @@ void IPTVRecorder::run(void)
         recordingWait.wakeAll();
     }
 
-    // Make sure the first things in the file are a PAT & PMT
-    bool tmp = _wait_for_keyframe_option;
-    _wait_for_keyframe_option = false;
-    HandleSingleProgramPAT(_stream_data->PATSingleProgram());
-    HandleSingleProgramPMT(_stream_data->PMTSingleProgram());
-    _wait_for_keyframe_option = tmp;
+    StartNewFile();
 
     _stream_data->AddAVListener(this);
     _stream_data->AddWritingListener(this);
diff --git a/mythtv/libs/libmythtv/recorders/iptvrecorder.h b/mythtv/libs/libmythtv/recorders/iptvrecorder.h
index d68c1e6..cbcd041 100644
--- a/mythtv/libs/libmythtv/recorders/iptvrecorder.h
+++ b/mythtv/libs/libmythtv/recorders/iptvrecorder.h
@@ -24,6 +24,7 @@ class IPTVRecorder : public DTVRecorder
     virtual bool Open(void); // RecorderBase
     virtual void Close(void); // RecorderBase
     bool IsOpen(void) const;
+    void StartNewFile(void);
 
     virtual void SetStreamData(MPEGStreamData*); // DTVRecorder
     virtual bool PauseAndWait(int timeout = 100); // RecorderBase
