Ticket #12486: hls-aes-decode.patch

File hls-aes-decode.patch, 2.8 KB (added by wnhtr2011@…, 9 years ago)
  • mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp

    diff --git a/mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp b/mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp
    index 194c85f..8680744 100644
    a b int HLSReader::DownloadSegmentData(MythSingleDownload& downloader, 
    12941294
    12951295#ifdef USING_LIBCRYPTO
    12961296    /* If the segment is encrypted, decode it */
    1297     if (segment.HasKeyPath())
     1297    if (hls->HasKeyPath())
    12981298    {
    12991299        if (!hls->DecodeData(downloader, hls->IVLoaded() ? hls->AESIV() : NULL,
    1300                              segment.KeyPath(),
    1301                              buffer, segment.Sequence()));
    1302         return 0;
     1300                             hls->KeyPath(),
     1301                             buffer, segment.Sequence()))
     1302        {
     1303            return 0;
     1304        }
    13031305    }
    13041306#endif
    13051307
  • mythtv/libs/libmythtv/recorders/HLS/HLSSegment.h

    diff --git a/mythtv/libs/libmythtv/recorders/HLS/HLSSegment.h b/mythtv/libs/libmythtv/recorders/HLS/HLSSegment.h
    index e38b08e..df065ec 100644
    a b class HLSRecSegment 
    3232#ifdef USING_LIBCRYPTO
    3333    bool DownloadKey(void);
    3434    bool DecodeData(const uint8_t *IV, QByteArray& data);
    35     bool HasKeyPath(void) const { return !m_psz_key_path.isEmpty(); }
    36     QString KeyPath(void) const { return m_psz_key_path; }
    37     void SetKeyPath(const QString path) { m_psz_key_path = path; }
     35    //bool HasKeyPath(void) const { return !m_psz_key_path.isEmpty(); }
     36    //QString KeyPath(void) const { return m_psz_key_path; }
     37    //void SetKeyPath(const QString path) { m_psz_key_path = path; }
    3838#endif
    3939
    4040  protected:
  • mythtv/libs/libmythtv/recorders/HLS/HLSStream.cpp

    diff --git a/mythtv/libs/libmythtv/recorders/HLS/HLSStream.cpp b/mythtv/libs/libmythtv/recorders/HLS/HLSStream.cpp
    index b2d64c2..7eb4471 100644
    a b bool HLSRecStream::DecodeData(MythSingleDownload& downloader, 
    8080{
    8181    AESKeyMap::iterator Ikey;
    8282
    83     if ((Ikey = m_aeskeys.find(keypath)) == m_aeskeys.end())
     83    if (!m_aeskeys.contains(keypath))
    8484    {
    8585        AES_KEY* key = new AES_KEY;
    8686        DownloadKey(downloader, keypath, key);
  • mythtv/libs/libmythtv/recorders/HLS/HLSStream.h

    diff --git a/mythtv/libs/libmythtv/recorders/HLS/HLSStream.h b/mythtv/libs/libmythtv/recorders/HLS/HLSStream.h
    index 8e81040..193c605 100644
    a b class HLSRecStream 
    6969
    7070    uint8_t *AESIV(void) { return m_AESIV; }
    7171    void SetKeyPath(const QString x) { m_keypath = x; }
     72    bool HasKeyPath(void) const { return !m_keypath.isEmpty(); }
     73    QString KeyPath(void) const { return m_keypath; }
     74
    7275#endif // USING_LIBCRYPTO
    7376
    7477  protected: