X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmatroskadec.c;h=fd1001ef8e0326dfb4867898c0d9101c8fd014b5;hb=e1a8164d62fb8d1943b3f7a66500f0315ca8fe76;hp=b47f4de8d46a0139cd9ba333511b12c2dff6c53c;hpb=95d6e5bdd58d5caaa52c57bad1e1d87df59fb7f8;p=ffmpeg diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b47f4de8d46..fd1001ef8e0 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -22,10 +22,10 @@ /** * @file * Matroska file demuxer - * by Ronald Bultje - * with a little help from Moritz Bunkus - * totally reworked by Aurelien Jacobs - * Specs available on the Matroska project page: http://www.matroska.org/. + * @author Ronald Bultje + * @author with a little help from Moritz Bunkus + * @author totally reworked by Aurelien Jacobs + * @see specs available on the Matroska project page: http://www.matroska.org/ */ #include @@ -38,7 +38,7 @@ #include "rm.h" #include "matroska.h" #include "libavcodec/mpeg4audio.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "libavutil/intreadwrite.h" #include "libavutil/avstring.h" #include "libavutil/lzo.h" @@ -652,9 +652,9 @@ static int ebml_read_float(AVIOContext *pb, int size, double *num) if (size == 0) { *num = 0; } else if (size == 4) { - *num= av_int2flt(avio_rb32(pb)); - } else if(size==8){ - *num= av_int2dbl(avio_rb64(pb)); + *num = av_int2float(avio_rb32(pb)); + } else if (size == 8){ + *num = av_int2double(avio_rb64(pb)); } else return AVERROR_INVALIDDATA; @@ -1554,7 +1554,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) if (track->time_scale < 0.01) track->time_scale = 1.0; - av_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ + avpriv_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ st->codec->codec_id = codec_id; st->start_time = 0; @@ -1567,10 +1567,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) if (track->flag_forced) st->disposition |= AV_DISPOSITION_FORCED; - if (track->default_duration) - av_reduce(&st->codec->time_base.num, &st->codec->time_base.den, - track->default_duration, 1000000000, 30000); - if (!st->codec->extradata) { if(extradata){ st->codec->extradata = extradata;