Index: mythtv/libs/libmythtv/hdhrrecorder.cpp
===================================================================
--- mythtv/libs/libmythtv/hdhrrecorder.cpp	(revision 21369)
+++ mythtv/libs/libmythtv/hdhrrecorder.cpp	(working copy)
@@ -176,14 +176,17 @@
         data->AddMPEGSPListener(this);
         data->AddMPEGListener(this);
 
-        ATSCStreamData *atsc = dynamic_cast<ATSCStreamData*>(data);
         DVBStreamData  *dvb  = dynamic_cast<DVBStreamData*>(data);
 
+        if (dvb)
+            dvb->AddDVBMainListener(this);
+
+        ATSCStreamData *atsc = dynamic_cast<ATSCStreamData*>(data);
+
         if (atsc && atsc->DesiredMinorChannel())
             atsc->SetDesiredChannel(atsc->DesiredMajorChannel(),
                                     atsc->DesiredMinorChannel());
-        else if (dvb)
-            dvb->AddDVBMainListener(this);
+
         else if (data->DesiredProgram() >= 0)
             data->SetDesiredProgram(data->DesiredProgram());
     }
@@ -301,8 +304,16 @@
             if (lpid == GetStreamData()->VideoPIDSingleProgram())
             {
                 //cerr<<"v";
-                _buffer_packets = !FindMPEG2Keyframes(&tspacket);
-                BufferedWrite(tspacket);
+		ProgramMapTable *pmt = _stream_data->PMTSingleProgram();
+		uint video_stream_type = pmt->StreamType(pmt->FindPID(lpid));
+
+		if (video_stream_type == StreamID::H264Video)
+			_buffer_packets = !FindH264Keyframes(&tspacket);
+		else if (StreamID::IsVideo(video_stream_type))
+			_buffer_packets = !FindMPEG2Keyframes(&tspacket);
+
+		if ((video_stream_type != StreamID::H264Video) || _seen_sps)
+			BufferedWrite(tspacket);            
             }
             else if (GetStreamData()->IsAudioPID(lpid))
             {
Index: mythtv/libs/libmythtv/hdhrchannel.cpp
===================================================================
--- mythtv/libs/libmythtv/hdhrchannel.cpp	(revision 21369)
+++ mythtv/libs/libmythtv/hdhrchannel.cpp	(working copy)
@@ -361,13 +361,13 @@
                        QString modulation, QString si_std)
 {
     // Convert dtv_multiplex.modulation strings to something the HDHR can use:
+#if 0
     modulation.replace("qam_", "qam");  // e.g. qam_256 -> qam256
-#if 0
     if (modulation == "qamauto")
         modulation = "qam";             // "auto" works just as well?
-#endif
 
     if (modulation.isEmpty())
+#endif
         modulation = "auto";
 
     QString chan = modulation + ':' + QString::number(frequency);
