X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fwtvdec.c;h=db9bb10068aee6e8b9b3eabefe031adca6407b72;hb=34aadeaa2c2ae2e84abde3cca0a8b1392b8294ac;hp=35114416aa3f0032893c7591a5ab505801cb35cc;hpb=7876f14f8be9d78de1875ff38390d2a37ac86ec3;p=ffmpeg diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 35114416aa3..db9bb10068a 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -26,7 +26,7 @@ */ #include "libavutil/intreadwrite.h" -#include "libavutil/intfloat_readwrite.h" +#include "libavutil/intfloat.h" #include "avformat.h" #include "internal.h" #include "wtv.h" @@ -287,6 +287,8 @@ static void wtvfile_close(AVIOContext *pb) { WtvFile *wf = pb->opaque; av_free(wf->sectors); + av_freep(&pb->opaque); + av_freep(&pb->buffer); av_free(pb); } @@ -388,7 +390,7 @@ static void crazytime_to_iso8601(char *buf, int buf_size, int64_t value) */ static int oledate_to_iso8601(char *buf, int buf_size, int64_t value) { - time_t t = (av_int2dbl(value) - 25569.0) * 86400; + time_t t = (av_int2double(value) - 25569.0) * 86400; struct tm *result= gmtime(&t); if (!result) return -1; @@ -460,7 +462,7 @@ static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int ty return; } } else if (!strcmp(key, "WM/WMRVBitrate")) - snprintf(buf, buf_size, "%f", av_int2dbl(num)); + snprintf(buf, buf_size, "%f", av_int2double(num)); else snprintf(buf, buf_size, "%"PRIi64, num); } else if (type == 5 && length == 2) { @@ -570,7 +572,7 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code } st->codec->codec_type = codec_type; st->need_parsing = AVSTREAM_PARSE_FULL; - av_set_pts_info(st, 64, 1, 10000000); + avpriv_set_pts_info(st, 64, 1, 10000000); return st; } @@ -1022,6 +1024,7 @@ static int read_seek(AVFormatContext *s, int stream_index, static int read_close(AVFormatContext *s) { WtvContext *wtv = s->priv_data; + av_freep(&wtv->index_entries); wtvfile_close(wtv->pb); return 0; }