Ticket #5299: libs_libmythtv-dead-code.patch

File libs_libmythtv-dead-code.patch, 6.3 KB (added by Erik Hovland <erik@…>, 17 years ago)
  • libs/libmythtv/avformatdecoder.cpp

    Remove code that cannot be executed.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/avformatdecoder.cpp |    8 +++-----
     libs/libmythtv/channel.cpp         |    8 +++-----
     libs/libmythtv/decoderbase.cpp     |    2 +-
     libs/libmythtv/dsmcc.cpp           |    2 +-
     libs/libmythtv/mhi.cpp             |    7 ++-----
     libs/libmythtv/vbitext/vbi.c       |   22 ++--------------------
     libs/libmythtv/videodev_myth.h     |    4 +++-
     libs/libmythtv/yuv2rgb.cpp         |    4 ++--
     8 files changed, 17 insertions(+), 40 deletions(-)
    
    diff --git a/libs/libmythtv/avformatdecoder.cpp b/libs/libmythtv/avformatdecoder.cpp
    index e7b4735..860cb8a 100644
    a b bool AvFormatDecoder::GetFrame(int onlyvideo)  
    31203120            {
    31213121                ateof = true;
    31223122                GetNVP()->SetEof();
    3123                 if (pkt)
    3124                     delete pkt;
     3123                delete pkt;
    31253124                return false;
    31263125            }
    31273126
    bool AvFormatDecoder::GetFrame(int onlyvideo)  
    32783277            if (GetNVP()->IsErrored())
    32793278            {
    32803279                av_free_packet(pkt);
    3281                 if (pkt)
    3282                     delete pkt;
     3280                delete pkt;
    32833281                return false;
    32843282            }
    32853283        }
    bool AvFormatDecoder::SetupAudioStream(void)  
    40474045                             audioIn.do_passthru);
    40484046
    40494047    // allow the audio stuff to reencode
    4050     GetNVP()->SetAudioCodec(using_passthru?codec_ctx:NULL);
     4048    GetNVP()->SetAudioCodec(NULL);
    40514049    GetNVP()->ReinitAudio();
    40524050
    40534051    return true;
  • libs/libmythtv/channel.cpp

    diff --git a/libs/libmythtv/channel.cpp b/libs/libmythtv/channel.cpp
    index 3bae71d..13725b5 100644
    a b static QString mode_to_format(int mode, int v4l_version)  
    249249            return "PAL";
    250250        else if (mode == VIDEO_MODE_SECAM)
    251251            return "SECAM";
    252         else if (mode == 3)
     252        else if (mode == VIDEO_MODE_PALNC)
    253253            return "PAL-NC";
    254         else if (mode == 4)
    255             return "PAL-M";
    256         else if (mode == 5)
     254        else if (mode == VIDEO_MODE_PALN)
    257255            return "PAL-N";
    258         else if (mode == 6)
     256        else if (mode == VIDEO_MODE_NTSCJP)
    259257            return "NTSC-JP";
    260258    }
    261259    else
  • libs/libmythtv/decoderbase.cpp

    diff --git a/libs/libmythtv/decoderbase.cpp b/libs/libmythtv/decoderbase.cpp
    index 9b3c78f..c067013 100644
    a b int DecoderBase::AutoSelectTrack(uint type)  
    934934    }
    935935
    936936    int oldTrack = currentTrack[type];
    937     currentTrack[type] = (selTrack < 0) ? -1 : selTrack;
     937    currentTrack[type] = selTrack;
    938938    StreamInfo tmp = tracks[type][currentTrack[type]];
    939939    selectedTrack[type] = tmp;
    940940
  • libs/libmythtv/dsmcc.cpp

    diff --git a/libs/libmythtv/dsmcc.cpp b/libs/libmythtv/dsmcc.cpp
    index 4386f31..fdad68c 100644
    a b void Dsmcc::ProcessSection(const unsigned char *data, int length,  
    414414        // We haven't seen this stream before but it has the correct
    415415        // data_broadcast_id. Create a carousel for it.
    416416        // This will only happen at start-up
    417         car = AddTap(componentTag, carouselId);
     417        AddTap(componentTag, carouselId);
    418418        m_startTag = componentTag;
    419419        found = true;
    420420    }
  • libs/libmythtv/mhi.cpp

    diff --git a/libs/libmythtv/mhi.cpp b/libs/libmythtv/mhi.cpp
    index dbd1657..c1c6da6 100644
    a b void MHIContext::SetNetBootInfo(const unsigned char *data, uint length)  
    264264    QMutexLocker locker(&m_dsmccLock);
    265265    // Save the data from the descriptor.
    266266    m_nbiData.duplicate(data, length);
    267     // If there is no Network Boot Info or we're setting it
    268     // for the first time just update the "last version".
    269     if (length < 2)
    270         m_lastNbiVersion = NBI_VERSION_ABSENT;
    271     else if (m_lastNbiVersion == NBI_VERSION_UNSET)
     267    // If we're setting it for the first time just update the "last version".
     268    if (m_lastNbiVersion == NBI_VERSION_UNSET)
    272269        m_lastNbiVersion = data[0];
    273270    else
    274271        m_engine_wait.wakeAll();
  • libs/libmythtv/vbitext/vbi.c

    diff --git a/libs/libmythtv/vbitext/vbi.c b/libs/libmythtv/vbitext/vbi.c
    index f7e31f4..0c67b5f 100644
    a b vbi_send(struct vbi *vbi, int type, int i1, int i2, int i3, void *p1)  
    114114static void
    115115vbi_send_page(struct vbi *vbi, struct raw_page *rvtp, int page)
    116116{
    117     struct vt_page *cvtp = 0;
    118 
    119117    if (rvtp->page->flags & PG_ACTIVE)
    120118    {
    121119       if (rvtp->page->pgno % 256 != page)
    122120       {
    123121           rvtp->page->flags &= ~PG_ACTIVE;
    124122           enhance(rvtp->enh, rvtp->page);
    125 //         if (vbi->cache)
    126 //             cvtp = vbi->cache->op->put(vbi->cache, rvtp->page);
    127            vbi_send(vbi, EV_PAGE, 0, 0, 0, cvtp ?: rvtp->page);
     123           vbi_send(vbi, EV_PAGE, 0, 0, 0, rvtp->page);
    128124       }
    129125    }
    130126}
    vbi_close(struct vbi *vbi)  
    693689struct vt_page *
    694690vbi_query_page(struct vbi *vbi, int pgno, int subno)
    695691{
    696     struct vt_page *vtp = 0;
    697 
    698     (void)pgno;
    699     (void)subno;
    700 
    701 //    if (vbi->cache)
    702 //     vtp = vbi->cache->op->get(vbi->cache, pgno, subno);
    703     if (vtp == 0)
    704     {
    705        // EV_PAGE will come later...
    706        return 0;
    707     }
    708 
    709     vbi_send(vbi, EV_PAGE, 1, 0, 0, vtp);
    710     return vtp;
     692    return 0;
    711693}
    712694
    713695void
  • libs/libmythtv/videodev_myth.h

    diff --git a/libs/libmythtv/videodev_myth.h b/libs/libmythtv/videodev_myth.h
    index 95ede70..438bde0 100644
    a b struct video_tuner  
    6464#define VIDEO_MODE_PAL          0
    6565#define VIDEO_MODE_NTSC         1
    6666#define VIDEO_MODE_SECAM        2
    67 #define VIDEO_MODE_AUTO         3
     67#define VIDEO_MODE_PALNC        3
    6868#define VIDEO_MODE_ATSC         4       /* dtv */
     69#define VIDEO_MODE_PALN         5
     70#define VIDEO_MODE_NTSCJP       6
    6971        __u16 signal;                   /* Signal strength 16bit scale */
    7072};
    7173
  • libs/libmythtv/yuv2rgb.cpp

    diff --git a/libs/libmythtv/yuv2rgb.cpp b/libs/libmythtv/yuv2rgb.cpp
    index 94eda86..9674eb5 100644
    a b yuv2rgb_fun yuv2rgb_init_mmx (int bpp, int mode)  
    376376        return mmx_rgb16;
    377377    else if ((bpp == 32) && (mode == MODE_RGB))
    378378        return mmx_argb32;
    379 #endif
    380 
     379#else
    381380    if ((bpp == 32) && (mode == MODE_RGB))
    382381        return yuv420_argb32_non_mmx;
     382#endif
    383383
    384384    return NULL;
    385385}