Index: libs/libmythtv/videoout_vdpau.h
===================================================================
--- libs/libmythtv/videoout_vdpau.h	(revision 23365)
+++ libs/libmythtv/videoout_vdpau.h	(working copy)
@@ -105,6 +105,8 @@
 
     uint                 m_decoder;
     int                  m_pix_fmt;
+    uint64_t             m_decoder_description;
+    bool                 m_force_reinit;
 
     int                  m_frame_delay;
     QMutex               m_lock;
Index: libs/libmythtv/videoout_vdpau.cpp
===================================================================
--- libs/libmythtv/videoout_vdpau.cpp	(revision 23365)
+++ libs/libmythtv/videoout_vdpau.cpp	(working copy)
@@ -27,7 +27,8 @@
     m_need_deintrefs(false), m_video_mixer(0), m_mixer_features(kVDPFeatNone),
     m_checked_surface_ownership(false),
     m_checked_output_surfaces(false),
-    m_decoder(0),            m_pix_fmt(-1),    m_frame_delay(0),
+    m_decoder(0),            m_pix_fmt(-1),    m_decoder_description(0),
+    m_force_reinit(false),   m_frame_delay(0),
     m_lock(QMutex::Recursive), m_pip_layer(0), m_pip_surface(0),
     m_pip_ready(false),
     m_osd_layer(0),          m_osd_surface(0), m_osd_output_surface(0),
@@ -130,6 +131,7 @@
     m_decoder = 0;
     m_render = NULL;
     m_pix_fmt = -1;
+    m_decoder_description = 0;
 }
 
 bool VideoOutputVDPAU::InitBuffers(void)
@@ -481,6 +483,10 @@
     m_checked_surface_ownership = true;
 }
 
+#define HASH_H264(arg) \
+  ((uint64_t)arg.num_ref_frames << 56) + \
+  ((uint64_t)arg.mb_adaptive_frame_field_flag << 48)
+
 void VideoOutputVDPAU::DrawSlice(VideoFrame *frame, int x, int y, int w, int h)
 {
     (void)x;
@@ -505,6 +511,21 @@
         return;
     }
 
+    if (frame->pix_fmt == PIX_FMT_VDPAU_H264 &&
+        frame->pix_fmt == m_pix_fmt && m_decoder &&
+        HASH_H264(render->info.h264) != m_decoder_description)
+    {
+        VERBOSE(VB_IMPORTANT, LOC +
+            QString("h264 stream type has changed."));
+        VERBOSE(VB_PLAYBACK, LOC + QString("Old desc '%1'")
+            .arg(m_decoder_description, 16, 16, QChar(48)));
+        VERBOSE(VB_PLAYBACK, LOC + QString("New desc '%1'")
+            .arg(HASH_H264(render->info.h264), 16, 16, QChar(48)));
+        m_force_reinit = true;
+        InputChanged(windows[0].GetVideoDispDim(), windows[0].GetVideoAspect(),
+                     m_codec_id, NULL);
+    }
+
     if (frame->pix_fmt != m_pix_fmt)
     {
         if (m_decoder)
@@ -518,6 +539,7 @@
         uint max_refs = 2;
         if (frame->pix_fmt == PIX_FMT_VDPAU_H264)
         {
+            m_decoder_description = HASH_H264(render->info.h264);
             max_refs = render->info.h264.num_ref_frames;
             if (max_refs < 1 || max_refs > 16)
             {
@@ -619,6 +641,13 @@
     bool res_changed = input_size  != windows[0].GetVideoDispDim();
     bool asp_changed = aspect      != windows[0].GetVideoAspect();
 
+    if (m_force_reinit)
+    {
+        VERBOSE(VB_IMPORTANT, LOC + QString("Forcing reinit."));
+        cid_changed = true;
+        m_force_reinit = false;
+    }
+
     if (!res_changed && !cid_changed)
     {
         if (asp_changed)

