Ticket #12693: ticket_12693.patch

File ticket_12693.patch, 1.6 KB (added by Peter Bennett <pgbennett@…>, 5 years ago)

Fix for this ticket

  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index 6e9e1ea..8e83212 100644
    a b using namespace std; 
    7777#include "ringbuffer.h"                 // for RingBuffer, etc
    7878#include "tv_actions.h"                 // for ACTION_TOGGLESLEEP, etc
    7979
     80#ifdef USING_OPENMAX
     81#include "videoout_omx.h"
     82#endif
     83
    8084#if ! HAVE_ROUND
    8185#define round(x) ((int) ((x) + 0.5))
    8286#endif
    void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx) 
    26102614            QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
    26112615        mainWindow->setGeometry(player_bounds);
    26122616        mainWindow->ResizePainterWindow(player_bounds.size());
    2613         // PGB Do not disable the GUI when using openmax decoder,
     2617        // PGB Do not disable the GUI when using openmax renderer,
    26142618        // to ensure that space next to letterbox pictures
    26152619        // is painted.
    2616         QString decName = ctx->player->GetDecoder()->GetCodecDecoderName();
    2617         if (decName != "openmax" && !weDisabledGUI)
     2620        // Since there is no "GetName" virtual method in VideoOutput
     2621        // I have to use dynamic_cast to check the renderer type.
     2622        // If the dynamic cast returns 0 then it is NOT omx renderer.
     2623#ifdef USING_OPENMAX
     2624        VideoOutput *testVideoOutput = ctx->player->GetVideoOutput();
     2625        if (dynamic_cast<VideoOutputOMX*>(testVideoOutput) == 0
     2626            && !weDisabledGUI)
     2627#else
     2628        if (!weDisabledGUI)
     2629#endif
    26182630        {
    26192631            weDisabledGUI = true;
    26202632            GetMythMainWindow()->PushDrawDisabled();