Index: libs/libmythtv/avformatdecoder.cpp
===================================================================
--- libs/libmythtv/avformatdecoder.cpp	(revision 19378)
+++ libs/libmythtv/avformatdecoder.cpp	(working copy)
@@ -873,6 +873,9 @@
  *  \param novideo if true then no video is sought in ScanSreams.
  *  \param testbuf this parameter is not used by AvFormatDecoder.
  */
+extern "C" {
+#include "libavutil/crc.h"
+}
 int AvFormatDecoder::OpenFile(RingBuffer *rbuffer, bool novideo, 
                               char testbuf[kDecoderProbeBufferSize],
                               int testbufsize)
@@ -899,12 +902,19 @@
         probe.buf_size = kDecoderProbeBufferSize - AVPROBE_PADDING_SIZE;
 
     fmt = av_probe_input_format(&probe, true);
+    uint checksum = av_crc(av_crc_get_table(AV_CRC_32_IEEE),
+                           (uint32_t) -1,
+                           (uint8_t*)testbuf, probe.buf_size - 1);
     if (!fmt)
     {
         VERBOSE(VB_IMPORTANT, LOC_ERR +
-                QString("Probe failed for file: \"%1\".").arg(filename));
+                QString("Probe failed for file: '%1' probe size %2 crc 0x%3")
+                .arg(filename).arg(probe.buf_size).arg(checksum,0,16));
         return -1;
     }
+    VERBOSE(VB_IMPORTANT, LOC +
+            QString("Probe suceeded for file: '%1' probe size %2 crc 0x%3")
+            .arg(filename).arg(probe.buf_size).arg(checksum,0,16));
 
     fmt->flags |= AVFMT_NOFILE;
 
Index: libs/libmythtv/tv_play.h
===================================================================
--- libs/libmythtv/tv_play.h	(revision 19378)
+++ libs/libmythtv/tv_play.h	(working copy)
@@ -291,10 +291,10 @@
 
     int  StartTimer(int interval, int line);
     void KillTimer(int id);
-    void ForceNextStateNone(PlayerContext*);
+    void ForceNextStateNone(PlayerContext*, int line);
     void ScheduleStateChange(PlayerContext*);
     void SetErrored(PlayerContext*);
-    void SetExitPlayer(bool set_it, bool wants_to) const;
+    void SetExitPlayerReal(bool set_it, bool wants_to, int line) const;
     void SetUpdateOSDPosition(bool set_it);
 
     bool PxPHandleAction(PlayerContext*,const QStringList &actions);
Index: libs/libmythtv/playercontext.cpp
===================================================================
--- libs/libmythtv/playercontext.cpp	(revision 19378)
+++ libs/libmythtv/playercontext.cpp	(working copy)
@@ -102,7 +102,7 @@
         newPlaygroup = playingInfo->playgroup;
     }
 
-    ChangeState(newState);
+    ChangeState(newState, __LINE__);
     SetPlayGroup(newPlaygroup);
 }
 
@@ -589,8 +589,10 @@
 /**
 *   \brief Puts a state change on the nextState queue.
 */
-void PlayerContext::ChangeState(TVState newState)
+void PlayerContext::ChangeState(TVState newState, int line)
 {
+    VERBOSE(VB_IMPORTANT, QString("ChangeState(%1,%2)")
+            .arg(StateToString(newState)).arg(line));
     QMutexLocker locker(&stateLock);
     nextState.enqueue(newState);
 }
@@ -604,8 +606,9 @@
 /**
  * \brief Removes any pending state changes, and puts kState_None on the queue.
  */
-void PlayerContext::ForceNextStateNone(void)
+void PlayerContext::ForceNextStateNone(int line)
 {
+    VERBOSE(VB_IMPORTANT, QString("ForceNextStateNone(%2)").arg(line));
     QMutexLocker locker(&stateLock);
     nextState.clear();
     nextState.push_back(kState_None);
Index: libs/libmythtv/tv_play.cpp
===================================================================
--- libs/libmythtv/tv_play.cpp	(revision 19378)
+++ libs/libmythtv/tv_play.cpp	(working copy)
@@ -65,6 +65,7 @@
 
 #define GetPlayer(X,Y) GetPlayerHaveLock(X, Y, __FILE__ , __LINE__)
 #define GetOSDLock(X) GetOSDL(X, __FILE__, __LINE__)
+#define SetExitPlayer(X,Y) SetExitPlayerReal(X,Y,__LINE__)
 
 const int  TV::kInitFFRWSpeed                = 0;
 const uint TV::kInputKeysMax                 = 6;
@@ -178,7 +179,7 @@
             VERBOSE(VB_PLAYBACK, LOC + "tv->LiveTV() -- begin");
             if (!tv->LiveTV(showDialogs, startInGuide))
             {
-                tv->SetExitPlayer(true, true);
+                tv->SetExitPlayerReal(true, true, __LINE__);
                 quitAll = true;
             }
             VERBOSE(VB_PLAYBACK, LOC + "tv->LiveTV() -- end");
@@ -2066,7 +2067,7 @@
     mctx = GetPlayerWriteLock(0, __FILE__, __LINE__);
     if (!mctx->IsErrored() && (GetState(mctx) != kState_None))
     {
-        mctx->ForceNextStateNone();
+        mctx->ForceNextStateNone(__LINE__);
         HandleStateChange(mctx, mctx);
         if (jumpToProgram)
             TeardownPlayer(mctx, mctx);
@@ -2380,10 +2381,10 @@
                 jumpToProgram = false;
             }
             else
-                ForceNextStateNone(mctx);
+                ForceNextStateNone(mctx, __LINE__);
         }
         else
-            ForceNextStateNone(mctx);
+            ForceNextStateNone(mctx, __LINE__);
 
         ReturnPlayerLock(mctx);
 
@@ -2582,7 +2583,7 @@
             (mctx->nvp && mctx->nvp->IsErrored()) || mctx->IsErrored())
         {
             SetExitPlayer(true, false);
-            ForceNextStateNone(mctx);
+            ForceNextStateNone(mctx, __LINE__);
             error = true;
         }
 
@@ -2590,7 +2591,7 @@
         {
             PlayerContext *ctx = GetPlayer(mctx, i);
             if (error || ctx->IsErrored())
-                ForceNextStateNone(ctx);
+                ForceNextStateNone(ctx, __LINE__);
         }
         ReturnPlayerLock(mctx);
 
@@ -2703,9 +2704,9 @@
     QObject::killTimer(id);
 }
 
-void TV::ForceNextStateNone(PlayerContext *ctx)
+void TV::ForceNextStateNone(PlayerContext *ctx, int line)
 {
-    ctx->ForceNextStateNone();
+    ctx->ForceNextStateNone(line);
     ScheduleStateChange(ctx);
 }
 
@@ -2723,8 +2724,11 @@
     errorRecoveryTimerId = StartTimer(1, __LINE__);
 }
 
-void TV::SetExitPlayer(bool set_it, bool wants_to) const
+void TV::SetExitPlayerReal(bool set_it, bool wants_to, int line) const
 {
+    VERBOSE(VB_IMPORTANT,
+            LOC + "SetExitPlayer("<<set_it<<","<<wants_to<<","<<line<<")");
+
     QMutexLocker locker(&timerIdLock);
     if (set_it)
     {
@@ -2780,7 +2784,7 @@
             continue;
         }
 
-        ForceNextStateNone(ctx);
+        ForceNextStateNone(ctx, __LINE__);
         if (mctx == ctx)
         {
             endOfRecording = true;
@@ -3926,6 +3930,8 @@
     }
     else if (has_action("ESCAPE", actions))
     {
+        VERBOSE(VB_IMPORTANT, LOC + "ESCAPE");
+
         osd = GetOSDLock(ctx);
         if (StateIsLiveTV(ctx->GetState()) &&
             (ctx->lastSignalMsgTime.elapsed() <
@@ -4598,7 +4604,7 @@
         swap(player[0],player[1]);
         player[0]->SetPIPState(kPIPOff);
         // End the old main context..
-        ForceNextStateNone(mctx);
+        ForceNextStateNone(mctx, __LINE__);
     }
 
     VERBOSE(VB_PLAYBACK, LOC + "CreatePBP() -- end : "<<ok);
@@ -4698,7 +4704,7 @@
             return true;
         }
 
-        ForceNextStateNone(ctx);
+        ForceNextStateNone(ctx, __LINE__);
         VERBOSE(VB_IMPORTANT, "StartPlayer PiP -- end : !ok");
         return false;
     }
@@ -4855,7 +4861,7 @@
     msg = (ctx1->isPIP()) ? tr("Stopping PIP") : tr("Stopping PBP");
     if (dctx)
     {
-        ForceNextStateNone(dctx);
+        ForceNextStateNone(dctx, __LINE__);
     }
     else
     {
@@ -4866,7 +4872,7 @@
         }
 
         for (uint i = player.size() - 1; i > 0; i--)
-            ForceNextStateNone(GetPlayer(actx,i));
+            ForceNextStateNone(GetPlayer(actx,i), __LINE__);
     }
 
     OSD *osd = GetOSDLock(mctx);
@@ -5063,7 +5069,7 @@
         return;
     }
 
-    ForceNextStateNone(mctx);
+    ForceNextStateNone(mctx, __LINE__);
     VERBOSE(VB_PLAYBACK, LOC +
             "PBPRestartMainNVP -- end !ok NVP did not restart");
 }
@@ -5097,7 +5103,7 @@
     {
         VERBOSE(VB_IMPORTANT, loc +
                 "Failed to restart new main context (was pip context)");
-        ForceNextStateNone(mctx);
+        ForceNextStateNone(mctx, __LINE__);
         return;
     }
 
@@ -5122,7 +5128,7 @@
         { // TODO print OSD informing user of Swap failure ?
             VERBOSE(VB_IMPORTANT, loc +
                     "Failed to restart new pip context (was main context)");
-            ForceNextStateNone(pipctx);
+            ForceNextStateNone(pipctx, __LINE__);
         }
     }
 
@@ -7628,7 +7634,7 @@
                 {
                     ctx->nvp->SetWatchingRecording(false);
                     ctx->nvp->SetLength(filelen);
-                    ctx->ChangeState(kState_WatchingPreRecorded);
+                    ctx->ChangeState(kState_WatchingPreRecorded, __LINE__);
                     ScheduleStateChange(ctx);
                 }
             }
@@ -10496,6 +10502,10 @@
 {
     playerLock.lockForWrite();
 
+    //VERBOSE(VB_IMPORTANT, LOC_WARN +
+    //        QString("GetPlayerWriteLock(%1,%2,%3) size(%4)")
+    //        .arg(which).arg(file).arg(location).arg(player.size()));
+
     if ((which >= (int)player.size()))
     {
         VERBOSE(VB_IMPORTANT, LOC_WARN +
@@ -10511,6 +10521,10 @@
 {
     playerLock.lockForRead();
 
+    //VERBOSE(VB_IMPORTANT, LOC_WARN +
+    //        QString("GetPlayerReadLock(%1,%2,%3) size(%4)")
+    //        .arg(which).arg(file).arg(location).arg(player.size()));
+
     if ((which >= (int)player.size()))
     {
         VERBOSE(VB_IMPORTANT, LOC_WARN +
@@ -10527,6 +10541,10 @@
 {
     playerLock.lockForRead();
 
+    //VERBOSE(VB_IMPORTANT, LOC_WARN +
+    //        QString("GetPlayerReadLock(%1,%2,%3) const size(%4)")
+    //        .arg(which).arg(file).arg(location).arg(player.size()));
+
     if ((which >= (int)player.size()))
     {
         VERBOSE(VB_IMPORTANT, LOC_WARN +
@@ -10574,12 +10592,20 @@
 
 void TV::ReturnPlayerLock(PlayerContext *&ctx)
 {
+    //VERBOSE(VB_IMPORTANT, LOC_WARN +
+    //        QString("ReturnPlayerLock() size(%4)")
+    //        .arg(player.size()));
+
     playerLock.unlock();
     ctx = NULL;
 }
 
 void TV::ReturnPlayerLock(const PlayerContext *&ctx) const
 {
+    //VERBOSE(VB_IMPORTANT, LOC_WARN +
+    //        QString("ReturnPlayerLock() const size(%4)")
+    //        .arg(player.size()));
+
     playerLock.unlock();
     ctx = NULL;
 }
Index: libs/libmythtv/playercontext.h
===================================================================
--- libs/libmythtv/playercontext.h	(revision 19378)
+++ libs/libmythtv/playercontext.h	(working copy)
@@ -88,8 +88,8 @@
     void LockState(void) const;
     void UnlockState(void) const;
     bool InStateChange(void) const;
-    void ChangeState(TVState newState);
-    void ForceNextStateNone(void);
+    void ChangeState(TVState newState, int line);
+    void ForceNextStateNone(int line);
     TVState DequeueNextState(void);
     TVState GetState(void) const;
     /// This is set if the player encountered some irrecoverable error.
