# HG changeset patch # User nenolod # Date 1180656784 25200 # Node ID 46476de8fc644622729021c2b369048497a62557 # Parent 6f5a4f0b6fb4cb18df48f963a3d0db86907b2f46 [svn] - avoid a memory leak with FD probing diff -r 6f5a4f0b6fb4 -r 46476de8fc64 ChangeLog --- a/ChangeLog Thu May 31 10:33:46 2007 -0700 +++ b/ChangeLog Thu May 31 17:13:04 2007 -0700 @@ -1,3 +1,10 @@ +2007-05-31 17:33:46 +0000 Giacomo Lozito + revision [2476] + - curl: allow user to customize connect timeout value using a connect_timeout entry in config file + trunk/src/curl/curl.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 51 insertions(+), 1 deletion(-) + + 2007-05-30 16:13:31 +0000 Tony Vroon revision [2474] Updated turkish translation by Murat ?\197?\158enel, closes bug #959. diff -r 6f5a4f0b6fb4 -r 46476de8fc64 src/wma/libffwma/avformat.h --- a/src/wma/libffwma/avformat.h Thu May 31 10:33:46 2007 -0700 +++ b/src/wma/libffwma/avformat.h Thu May 31 17:13:04 2007 -0700 @@ -546,6 +546,7 @@ int av_read_play(AVFormatContext *s); int av_read_pause(AVFormatContext *s); void av_close_input_file(AVFormatContext *s); +void av_close_input_vfsfile(AVFormatContext *s); AVStream *av_new_stream(AVFormatContext *s, int id); void av_set_pts_info(AVFormatContext *s, int pts_wrap_bits, int pts_num, int pts_den); diff -r 6f5a4f0b6fb4 -r 46476de8fc64 src/wma/libffwma/futils.c --- a/src/wma/libffwma/futils.c Thu May 31 10:33:46 2007 -0700 +++ b/src/wma/libffwma/futils.c Thu May 31 17:13:04 2007 -0700 @@ -1553,6 +1553,37 @@ } /** + * Close a media file (but not its codecs) + * Does not close the VFS handle. + * + * @param s media file handle + */ +void av_close_input_vfsfile(AVFormatContext *s) +{ + int i, must_open_file; + AVStream *st; + + /* free previous packet */ + if (s->cur_st && s->cur_st->parser) + av_free_packet(&s->cur_pkt); + + if (s->iformat->read_close) + s->iformat->read_close(s); + for(i=0;inb_streams;i++) { + /* free all data in a stream component */ + st = s->streams[i]; + if (st->parser) { + av_parser_close(st->parser); + } + free(st->index_entries); + free(st); + } + flush_packet_queue(s); + av_freep(&s->priv_data); + free(s); +} + +/** * Add a new stream to a media file. Can only be called in the * read_header function. If the flag AVFMTCTX_NOHEADER is in the * format context, then new streams can be added in read_packet too. diff -r 6f5a4f0b6fb4 -r 46476de8fc64 src/wma/wma.c --- a/src/wma/wma.c Thu May 31 10:33:46 2007 -0700 +++ b/src/wma/wma.c Thu May 31 17:13:04 2007 -0700 @@ -212,6 +212,12 @@ codec2 = avcodec_find_decoder(c2->codec_id); + if (!codec2) { + av_close_input_vfsfile(ic2); + return 0; + } + + av_close_input_vfsfile(ic2); return 1; }