Ticket #8134: afd_based_solution_to_8134_v2.diff

File afd_based_solution_to_8134_v2.diff, 1.6 KB (added by skamithi, 16 years ago)

make scanstream check a little more broad, so expand to catch any audio codec with 1 channel or more.

  • mythtv/libs/libavcodec/pcm.c

    diff --git a/mythtv/libs/libavcodec/pcm.c b/mythtv/libs/libavcodec/pcm.c
    index b16f663..572ee94 100644
    a b static int pcm_decode_frame(AVCodecContext *avctx,  
    373373
    374374    n = buf_size/sample_size;
    375375
    376     switch(avctx->codec_id) {
     376    switch(avctx->codec->id) {
    377377    case CODEC_ID_PCM_U32LE:
    378378        DECODE(uint32_t, le32, src, samples, n, 0, 0x80000000)
    379379        break;
  • mythtv/libs/libmythtv/avformatdecoder.cpp

    diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
    index c332004..a3f4a01 100644
    a b int AvFormatDecoder::ScanStreams(bool novideo)  
    20302030                        .arg(codec_id_string(enc->codec_id))
    20312031                        .arg(enc->channels));
    20322032
     2033                if (ringBuffer && ringBuffer->isDVD() && enc->channels == 0)
     2034                    continue;
    20332035#if 0
    20342036                // HACK MULTICHANNEL DTS passthru disabled for multichannel,
    20352037                // dont know how to handle this
    bool AvFormatDecoder::GetFrame(DecodeType decodetype)  
    39113913                    .arg(codec_id_string(curstream->codec->codec_id))
    39123914                    .arg(curstream->codec->codec_id));
    39133915            av_free_packet(pkt);
     3916
     3917            // workaround for #8134.
     3918            if (ringBuffer && ringBuffer->isDVD() &&
     3919                curstream->codec->codec_type == CODEC_TYPE_AUDIO &&
     3920                curstream->codec->channels > 0)
     3921            {
     3922                ScanStreams(false);
     3923            }
    39143924            continue;
    39153925        }
    39163926