Ticket #8134: ffmpeg_based_fix_for_8134.diff

File ffmpeg_based_fix_for_8134.diff, 1.1 KB (added by skamithi, 14 years ago)

ffmpeg based fix. change the way streams changed is called. this ensure that dvd audio streams are properly detected.

  • mythtv/libs/libavformat/mpeg.c

    diff --git a/mythtv/libs/libavformat/mpeg.c b/mythtv/libs/libavformat/mpeg.c
    index 436480a..4b67843 100644
    a b static int mpegps_read_packet(AVFormatContext *s, 
    533533    if (codec_id != CODEC_ID_PCM_S16BE)
    534534        st->need_parsing = AVSTREAM_PARSE_FULL;
    535535
    536     /* notify the callback of the change in streams */
    537     if (s->streams_changed) {
     536    /* notify the callback of the change in streams for non Audio streams*/
     537    if (s->streams_changed && type != CODEC_TYPE_AUDIO) {
    538538        s->streams_changed(s->stream_change_data);
    539539    }
    540540
    static int mpegps_read_packet(AVFormatContext *s, 
    565565        else if (st->codec->bits_per_coded_sample == 28)
    566566            return AVERROR(EINVAL);
    567567    }
     568
     569    /* notify the callback of the change in streams for non Audio streams*/
     570    if (s->streams_changed && type == CODEC_TYPE_AUDIO) {
     571        s->streams_changed(s->stream_change_data);
     572    }
     573
    568574    av_new_packet(pkt, len);
    569575    get_buffer(s->pb, pkt->data, pkt->size);
    570576    pkt->pts = pts;