Ticket #2758: patchpcm16dvd.diff

File patchpcm16dvd.diff, 816 bytes (added by Carl Eugen Hoyos, 13 years ago)
  • libavformat/mpeg.c

    diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
    index 5d5b09f..fc86ae6 100644
    a b static int mpegps_read_packet(AVFormatContext *s,  
    581581                goto skip;
    582582            avio_skip(s->pb, 6);
    583583            len -=6;
    584       } else {
     584      } else if (0){
    585585        int b1, freq;
    586586
    587587        /* for LPCM, we just skip the header and consider it is raw
    static int mpegps_read_packet(AVFormatContext *s,  
    604604        else if (st->codec->bits_per_coded_sample == 28)
    605605            return AVERROR(EINVAL);
    606606      }
     607else {
     608avio_skip(s->pb, 16);
     609len -= 16;
     610st->codec->sample_rate = 44100;
     611st->codec->channels = 2;
     612st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
     613}
    607614    }
    608615    ret = av_get_packet(s->pb, pkt, len);
    609616    pkt->pts = pts;