diff --git a/aviclasses/AVIReadHandler.cpp b/aviclasses/AVIReadHandler.cpp index 68b69758c..69a906014 100644 --- a/aviclasses/AVIReadHandler.cpp +++ b/aviclasses/AVIReadHandler.cpp @@ -2377,7 +2377,7 @@ void AVIReadHandler::FixCacheProblems(AVIReadStream *arse) { // disable its cache. AVIStreamNode *stream_leader = NULL; - int stream_leader_no; + int stream_leader_no=0; int streamno=0; pasn = listStreams.AtHead(); diff --git a/avilib-0.6.10/Makefile.am b/avilib-0.6.10/Makefile.am index 38ff7dad6..61e309a7b 100644 --- a/avilib-0.6.10/Makefile.am +++ b/avilib-0.6.10/Makefile.am @@ -6,7 +6,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/common noinst_LIBRARIES = libavi.a -CFLAGS=-O3 -funroll-loops -ffast-math -DLINUX -Wall @CFLAGS@ +CFLAGS=@CFLAGS@ -O3 -funroll-loops -ffast-math -DLINUX -Wall libavi_a_SOURCES = avilib.c avidump.c avimisc.c EXTRA_DIST = avilib.h README.avilib diff --git a/avilib-0.6.10/avilib.h b/avilib-0.6.10/avilib.h index f46c9806f..e5a7ee723 100644 --- a/avilib-0.6.10/avilib.h +++ b/avilib-0.6.10/avilib.h @@ -34,7 +34,6 @@ #if defined(COMP_MSC) #include -#include #endif #include diff --git a/configure.in b/configure.in index 1f535d978..6f9828e12 100644 --- a/configure.in +++ b/configure.in @@ -6,10 +6,16 @@ AC_PREREQ(2.50) AM_INIT_AUTOMAKE(mkvtoolnix,0.7.7) AM_CONFIG_HEADER(config.h) +echo CFLAGS 1: $CFLAGS +SAVED_CFLAGS="$CFLAGS" AC_PROG_CC +CFLAGS="$SAVED_CFLAGS" +echo CFLAGS 2: $CFLAGS AC_PROG_CC_C_O AC_PROG_CPP +SAVED_CXXFLAGS="$CXXFLAGS" AC_PROG_CXX +CXXFLAGS="$SAVED_CXXFLAGS" AC_PROG_MAKE_SET dnl Find the right ranlib, even when cross-compiling AC_CHECK_TOOL(RANLIB, ranlib, :) @@ -94,6 +100,12 @@ AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR Path to other library directories separated by ';'],, with_extra_libs_given=no) EXTRA_CFLAGS= + + USER_CFLAGS="$CFLAGS" + USER_CPPFLAGS="$CPPFLAGS" + USER_CXXFLAGS="$CXXFLAGS" + USER_LDFLAGS="$LDFLAGS" + if test "$with_extra_includes" != ""; then DIRS=`echo $with_extra_includes | cut -d '=' -f 2 | sed 's,;, -I,g'` EXTRA_CFLAGS="-I$DIRS" @@ -237,8 +249,7 @@ dnl AC_CHECK_LIB(ogg, ogg_sync_init, [ OGG_LIBS="-logg" ogg_found=yes ], - [ ogg_found=no ], - "$OGG_LIBS") + [ ogg_found=no ],) if test "$ogg_found" = "no"; then AC_MSG_ERROR([Could not find the Ogg library]) fi @@ -277,7 +288,7 @@ dnl [ FLAC_LIBS="-lFLAC -lm" flac_found=yes ], [ flac_found=no ], - "$FLAC_LIBS") + "-lm") if test "$flac_found" = "yes"; then AC_CHECK_HEADERS(FLAC/format.h, , flac_found=no) else @@ -588,29 +599,37 @@ dnl AC_MSG_CHECKING(for wxWindows) if wx-config --cxxflags > /dev/null 2>&1; then wxwversion=`wx-config --version` - wxwver_ok=`echo $wxwversion | sed 's;\.;\ ;g' | (read -a mver - if test ${mver[[0]]} -gt 2 ; then - wxwver_ok=1 - elif test ${mver[[0]]} -lt 2 ; then + wxw_ver_req_major=2 + wxw_ver_req_minor=4 + wxw_ver_req_micro=0 + set - `echo $wxwversion | sed 's/\./\ /g'` + if test "x$1" = "x" -o $1 -lt ${wxw_ver_req_major} ; then wxwver_ok=0 + elif test $1 -gt ${wxw_ver_req_major} ; then + wxwver_ok=1 else - if test ${mver[[1]]} -ge 4 ; then + if test "x$2" = "x" -o $2 -lt ${wxw_ver_req_minor} ; then + wxwver_ok=0 + elif test $2 -gt ${wxw_ver_req_minor} ; then wxwver_ok=1 else - wxwver_ok=0 + if test "x$3" = "x" -o $3 -lt ${wxw_ver_req_micro} ; then + wxwver_ok=0 + else + wxwver_ok=1 + fi fi fi - echo $wxwver_ok )` if test "$wxwver_ok" = "1" ; then if test "$MINGW" = "1" ; then - WXWINDOWS_CFLAGS=$(wx-config --cxxflags | sed 's;-I;-Ic:/cygwin;g') - WXWINDOWS_LDFLAGS=$(wx-config --ldflags | sed 's;-L;-Lc:/cygwin;g') - WXWINDOWS_LIBS=$(wx-config --libs | sed -e 's;-L;-Lc:/cygwin;g' -e 's; /usr/local/lib/libwx; c:/cygwin/usr/local/lib/libwx;g') + WXWINDOWS_CFLAGS=`wx-config --cxxflags | sed 's;-I;-Ic:/cygwin;g'` + WXWINDOWS_LDFLAGS=`wx-config --ldflags | sed 's;-L;-Lc:/cygwin;g'` + WXWINDOWS_LIBS=`wx-config --libs | sed -e 's;-L;-Lc:/cygwin;g' -e 's; /usr/local/lib/libwx; c:/cygwin/usr/local/lib/libwx;g'` else - WXWINDOWS_CFLAGS=$(wx-config --cxxflags) - WXWINDOWS_LDFLAGS=$(wx-config --ldflags) - WXWINDOWS_LIBS=$(wx-config --libs) + WXWINDOWS_CFLAGS=`wx-config --cxxflags` + WXWINDOWS_LDFLAGS=`wx-config --ldflags` + WXWINDOWS_LIBS=`wx-config --libs` fi AC_DEFINE(HAVE_WXWINDOWS, 1, [Define if wxWindows is present]) MMG_SUBDIRS=mmg @@ -684,7 +703,7 @@ AC_ARG_WITH(avilib, have_avilib0_6_10=yes fi AM_CONDITIONAL(HAVE_AVILIB, test x"$have_avilib0_6_10" != "xyes") - AM_CONDITIONAL(HAVE_AVILIB0_6_10, test x"$have_avilib0_6_10" == "xyes") + AM_CONDITIONAL(HAVE_AVILIB0_6_10, test x"$have_avilib0_6_10" = "xyes") AM_CONDITIONAL(HAVE_AVICLASSES, test x"$have_aviclasses" = "xyes") AVILIB_LIBS="-lavi" @@ -694,9 +713,11 @@ AC_ARG_WITH(avilib, AC_SUBST(AVILIB_LIBS) AC_SUBST(AVICLASSES_LIBS) -CFLAGS="-Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @EXTRA_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@" -CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @EXTRA_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@" -CPPFLAGS="@EXTRA_CFLAGS@" -LDFLAGS="@EXTRA_LDFLAGS@" +echo CFLAGS 3: $CFLAGS +CFLAGS="$USER_CFLAGS -Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @EXTRA_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@" +echo CFLAGS 4: $CFLAGS +CXXFLAGS="$USER_CXXFLAGS -Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @EXTRA_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@" +CPPFLAGS="$USER_CPPFLAGS @EXTRA_CFLAGS@" +LDFLAGS="$USER_LDFLAGS @EXTRA_LDFLAGS@" AC_OUTPUT(Makefile avilib-0.6.10/Makefile aviclasses/Makefile src/Makefile src/common/Makefile src/input/Makefile src/output/Makefile src/mmg/Makefile doc/Makefile) diff --git a/src/base64tool.cpp b/src/base64tool.cpp index ee24af4af..27e6e4f02 100644 --- a/src/base64tool.cpp +++ b/src/base64tool.cpp @@ -53,6 +53,10 @@ int main(int argc, char *argv[]) { if (argc < 4) usage(0); + mode = 0; + in = NULL; + out = NULL; + intext = NULL; if (!strcmp(argv[1], "encode")) mode = 'e'; else if (!strcmp(argv[1], "decode")) diff --git a/src/cluster_helper.cpp b/src/cluster_helper.cpp index 1c3075666..510a6a14d 100644 --- a/src/cluster_helper.cpp +++ b/src/cluster_helper.cpp @@ -305,6 +305,7 @@ void cluster_helper_c::set_duration_and_timeslices(render_groups_t *rg) { if (rg->durations.size() == 0) return; + slice = NULL; group = rg->groups.back(); block_duration = 0; for (i = 0; i < rg->durations.size(); i++) @@ -367,6 +368,7 @@ int cluster_helper_c::render() { if ((clusters == NULL) || (num_clusters == 0)) return 0; + max_timecode = 0; walk_clusters(); clstr = clusters[num_clusters - 1]; cluster = clstr->cluster; diff --git a/src/common/aac_common.cpp b/src/common/aac_common.cpp index b2ac990ad..786a4e965 100644 --- a/src/common/aac_common.cpp +++ b/src/common/aac_common.cpp @@ -39,6 +39,9 @@ int parse_aac_adif_header(unsigned char *buf, int size, int channels; bit_cursor_c bc(buf, size); + eob = false; + comment_field_bytes = 0; + channels = 0; bc.get_bits(32, bits); if (bits != FOURCC('A', 'D', 'I', 'F')) return 0; diff --git a/src/common/chapters.cpp b/src/common/chapters.cpp index 1da3f9c27..d94bff948 100644 --- a/src/common/chapters.cpp +++ b/src/common/chapters.cpp @@ -142,6 +142,8 @@ KaxChapters *parse_simple_chapters(mm_text_io_c *in, int64_t min_tc, atom = NULL; edition = NULL; num = 0; + start = 0; + cc_utf8 = 0; if (in->get_byte_order() == BO_NONE) { do_convert = true; @@ -321,8 +323,10 @@ KaxChapters *parse_cue_chapters(mm_text_io_c *in, int64_t min_tc, do_convert = true; cc_utf8 = utf8_init(charset); - } else + } else { do_convert = false; + cc_utf8 = 0; + } if (language == NULL) language = "eng"; @@ -481,6 +485,7 @@ KaxChapters *parse_chapters(const char *file_name, int64_t min_tc, bool exception_on_error, bool *is_simple_format) { mm_text_io_c *in; + in = NULL; try { in = new mm_text_io_c(file_name); } catch (...) { diff --git a/src/common/common.h b/src/common/common.h index 6d45807f1..25428a9da 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -24,7 +24,6 @@ #include "os.h" #include -#include #include diff --git a/src/common/mm_io.cpp b/src/common/mm_io.cpp index 3ee9f6cbe..650633fbd 100644 --- a/src/common/mm_io.cpp +++ b/src/common/mm_io.cpp @@ -597,6 +597,7 @@ int mm_text_io_c::read_next_char(char *buffer) { if (byte_order == BO_NONE) return read(buffer, 1); + size = 0; if (byte_order == BO_UTF8) { if (read(stream, 1) != 1) return 0; diff --git a/src/common/mm_io.h b/src/common/mm_io.h index 39a837291..46e62f4a7 100644 --- a/src/common/mm_io.h +++ b/src/common/mm_io.h @@ -23,8 +23,6 @@ #include "os.h" -#include - #include #include diff --git a/src/common/os.h b/src/common/os.h index f0ddd6019..6f96940c4 100644 --- a/src/common/os.h +++ b/src/common/os.h @@ -41,9 +41,12 @@ # define LLU "%llu" #endif // COMP_MINGW || COMP_MSC -#if !defined(COMP_CYGWIN) +#if defined(HAVE_STDINT_H) #include -#endif // !COMP_CYGWIN +#endif // HAVE_STDINT_H +#if defined(HAVE_INTTYPES_H) +#include +#endif // HAVE_INTTYPES_H #if defined(SYS_WINDOWS) # define PATHSEP '\\' diff --git a/src/common/tagparser_end.cpp b/src/common/tagparser_end.cpp index f03485b12..7d6a83ee6 100644 --- a/src/common/tagparser_end.cpp +++ b/src/common/tagparser_end.cpp @@ -116,6 +116,8 @@ static void el_get_binary(parser_data_t *pdata, EbmlElement *el) { binary *buffer; mm_io_c *io; + result = 0; + buffer = NULL; strip(*pdata->bin, true); if (pdata->bin->length() == 0) tperror(pdata, "Found neither Base64 encoded data nor '@file' to read " diff --git a/src/common/tagparser_start.cpp b/src/common/tagparser_start.cpp index 141722596..41a272ebd 100644 --- a/src/common/tagparser_start.cpp +++ b/src/common/tagparser_start.cpp @@ -825,6 +825,7 @@ void parse_xml_tags(const char *name, KaxTags *tags) { XML_Error xerror; char *emsg; + io = NULL; try { io = new mm_io_c(name, MODE_READ); } catch(...) { diff --git a/src/common/tagwriter.cpp b/src/common/tagwriter.cpp index 6d81f9147..495918d79 100644 --- a/src/common/tagwriter.cpp +++ b/src/common/tagwriter.cpp @@ -19,8 +19,7 @@ #include #include - -#include +#include #include #include diff --git a/src/input/r_avi.cpp b/src/input/r_avi.cpp index c941d68c9..28de7a84a 100644 --- a/src/input/r_avi.cpp +++ b/src/input/r_avi.cpp @@ -469,6 +469,7 @@ int avi_reader_c::read(generic_packetizer_c *ptzr) { int size; #endif + key = 0; if ((vpacketizer != NULL) && !video_done && (vpacketizer == ptzr)) { debug_enter("avi_reader_c::read (video)"); diff --git a/src/input/r_matroska.cpp b/src/input/r_matroska.cpp index 0e535e1a2..50365153b 100644 --- a/src/input/r_matroska.cpp +++ b/src/input/r_matroska.cpp @@ -576,6 +576,7 @@ void kax_reader_c::handle_attachments(mm_io_c *io, EbmlStream *es, bool found; kax_attachment_t matt; + data = NULL; io->save_pos(pos); l1 = es->FindNextElement(l0->Generic().Context, upper_lvl_el, 0xFFFFFFFFL, true); @@ -697,9 +698,8 @@ int kax_reader_c::read_headers() { kax_track_t *track; bool exit_loop; + exit_loop = false; try { - // Create the interface between MPlayer's IO system and - // libmatroska's IO system. in = new mm_io_c(ti->fname, MODE_READ); es = new EbmlStream(*in); @@ -734,7 +734,7 @@ int kax_reader_c::read_headers() { segment = l0; upper_lvl_el = 0; - exit_loop = 0; + exit_loop = false; tc_scale = TIMECODE_SCALE; // We've got our segment, so let's find the tracks l1 = es->FindNextElement(l0->Generic().Context, upper_lvl_el, 0xFFFFFFFFL, @@ -1326,6 +1326,8 @@ void kax_reader_c::create_packetizers() { // 0123456789012345 int id, profile, sbridx; + id = 0; + profile = 0; if (t->codec_id[10] == '2') id = AAC_ID_MPEG2; else if (t->codec_id[10] == '4') diff --git a/src/input/r_ogm.cpp b/src/input/r_ogm.cpp index 3f4fe61bf..5c70fd426 100644 --- a/src/input/r_ogm.cpp +++ b/src/input/r_ogm.cpp @@ -758,6 +758,7 @@ void ogm_reader_c::process_page(ogg_page *og) { int hdrlen, eos, i; long lenbytes; + lenbytes = 0; dmx = find_demuxer(ogg_page_serialno(og)); if (dmx == NULL) return; diff --git a/src/input/r_qtmp4.cpp b/src/input/r_qtmp4.cpp index cd1a806d9..c4c31f4d2 100644 --- a/src/input/r_qtmp4.cpp +++ b/src/input/r_qtmp4.cpp @@ -785,6 +785,7 @@ int qtmp4_reader_c::read(generic_packetizer_c *ptzr) { int64_t timecode, duration; unsigned char *buffer; + frame = 0; chunks_left = false; for (i = 0; i < demuxers.size(); i++) { dmx = demuxers[i]; @@ -1059,6 +1060,7 @@ void qtmp4_reader_c::create_packetizers() { int profile, srate_idx, channels, osrate_idx; bool sbraac; + osrate_idx = 0; if ((dmx->a_esds.decoder_config_len == 2) || (dmx->a_esds.decoder_config_len == 5)) { profile = (dmx->a_esds.decoder_config[0] >> 3) - 1; diff --git a/src/input/r_srt.cpp b/src/input/r_srt.cpp index 5b15fd408..8cde13304 100644 --- a/src/input/r_srt.cpp +++ b/src/input/r_srt.cpp @@ -104,6 +104,8 @@ int srt_reader_c::read(generic_packetizer_c *) { int state, i, line_number; bool non_number_found; + start = 0; + end = 0; state = STATE_INITIAL; line_number = 0; subtitles = ""; diff --git a/src/input/r_ssa.cpp b/src/input/r_ssa.cpp index be0219f1b..182e1f71d 100644 --- a/src/input/r_ssa.cpp +++ b/src/input/r_ssa.cpp @@ -71,6 +71,7 @@ ssa_reader_c::ssa_reader_c(track_info_t *nti) throw (error_c): int i; is_ass = false; + section = 0; try { mm_io = new mm_text_io_c(ti->fname); diff --git a/src/mkvextract_attachments.cpp b/src/mkvextract_attachments.cpp index 5401ca58c..60f61a40b 100644 --- a/src/mkvextract_attachments.cpp +++ b/src/mkvextract_attachments.cpp @@ -86,6 +86,7 @@ static void handle_attachments(mm_io_c *in, EbmlStream *es, EbmlElement *l0, bool found; mm_io_c *out; + out = NULL; in->save_pos(pos); l1 = es->FindNextElement(l0->Generic().Context, upper_lvl_el, 0xFFFFFFFFL, true); diff --git a/src/mkvextract_tracks.cpp b/src/mkvextract_tracks.cpp index 4787c6d8a..52089bd61 100644 --- a/src/mkvextract_tracks.cpp +++ b/src/mkvextract_tracks.cpp @@ -867,6 +867,7 @@ bool extract_tracks(const char *file_name) { int64_t block_duration; mm_io_c *in; + block = NULL; // open input file try { in = new mm_io_c(file_name, MODE_READ); diff --git a/src/mkvinfo.cpp b/src/mkvinfo.cpp index 8b42b06c9..45a636fa6 100644 --- a/src/mkvinfo.cpp +++ b/src/mkvinfo.cpp @@ -557,6 +557,8 @@ bool process_file(const char *file_name) { string strc; mm_io_c *in; + lf_timecode = 0; + lf_tnum = 0; // open input file try { in = new mm_io_c(file_name, MODE_READ); diff --git a/src/mkvmerge.cpp b/src/mkvmerge.cpp index e551d6a67..1940329d2 100644 --- a/src/mkvmerge.cpp +++ b/src/mkvmerge.cpp @@ -364,6 +364,9 @@ static int get_type(char *filename) { uint64_t size; int type; + mm_io = NULL; + mm_text_io = NULL; + size = 0; try { mm_io = new mm_io_c(filename, MODE_READ); mm_io->setFilePointer(0, seek_end); @@ -1806,6 +1809,7 @@ static char **read_args_from_file(int &num_args, char **args, char *filename) { string buffer, opt1, opt2; int space; + mm_io = NULL; try { mm_io = new mm_text_io_c(filename); } catch (exception &ex) { @@ -1956,6 +1960,7 @@ string create_output_name() { bool ok; char buffer[20]; + p2 = 0; // First possibility: %d p = s.find("%d"); if (p >= 0) { diff --git a/src/mmg/kax_analyzer.cpp b/src/mmg/kax_analyzer.cpp index 9b4c0025f..117a27edb 100644 --- a/src/mmg/kax_analyzer.cpp +++ b/src/mmg/kax_analyzer.cpp @@ -315,8 +315,7 @@ bool kax_analyzer_c::update_element(EbmlElement *e) { if (e == NULL) return false; -// dumpme(data); - + found_where = 0; for (i = 0; i < data.size(); i++) data[i]->delete_this = false; diff --git a/src/mmg/mmg.h b/src/mmg/mmg.h index 0442040d1..ef84173a9 100644 --- a/src/mmg/mmg.h +++ b/src/mmg/mmg.h @@ -23,7 +23,6 @@ #define __MMG_DIALOG_H #include -#include #include "matroska/KaxChapters.h" diff --git a/src/mmg/mux_dialog.cpp b/src/mmg/mux_dialog.cpp index 3ca5d8e44..ed7af4e9f 100644 --- a/src/mmg/mux_dialog.cpp +++ b/src/mmg/mux_dialog.cpp @@ -47,6 +47,7 @@ mux_dialog::mux_dialog(wxWindow *parent): wxString line, tmp; wxInputStream *out; + c = 0; new wxStaticBox(this, -1, _("Status and progress"), wxPoint(10, 5), wxSize(480, 70)); st_label = new wxStaticText(this, -1, _(""), wxPoint(15, 25), diff --git a/src/output/p_aac.cpp b/src/output/p_aac.cpp index 1d200f205..33a513b53 100644 --- a/src/output/p_aac.cpp +++ b/src/output/p_aac.cpp @@ -64,6 +64,7 @@ unsigned char *aac_packetizer_c::get_aac_packet(unsigned long *header, unsigned char *buf, *src, *packet_buffer; double pims; + buf = NULL; packet_buffer = byte_buffer.get_buffer(); size = byte_buffer.get_size(); if (buf == NULL) @@ -176,6 +177,7 @@ int aac_packetizer_c::process(unsigned char *buf, int size, debug_enter("aac_packetizer_c::process"); + my_timecode = 0; if (headerless) { if (timecode != -1) my_timecode = timecode; diff --git a/src/output/p_vobsub.cpp b/src/output/p_vobsub.cpp index a551076e2..6a18bcb49 100644 --- a/src/output/p_vobsub.cpp +++ b/src/output/p_vobsub.cpp @@ -154,6 +154,7 @@ int vobsub_packetizer_c::process(unsigned char *srcbuf, int size, const unsigned char wanted[] = { 0, 0, 1 }; unsigned char buf[5]; + pts = 0.0; packet_num++; timecode += initial_displacement; diff --git a/src/pr_generic.cpp b/src/pr_generic.cpp index 12f6dd24d..65d20861f 100644 --- a/src/pr_generic.cpp +++ b/src/pr_generic.cpp @@ -364,6 +364,7 @@ void generic_packetizer_c::set_video_aspect_ratio(float ar) { void generic_packetizer_c::set_as_default_track(int type) { int idx; + idx = 0; if (type == track_audio) idx = 0; else if (type == track_video) @@ -381,6 +382,7 @@ void generic_packetizer_c::set_as_default_track(int type) { void generic_packetizer_c::force_default_track(int type) { int idx; + idx = 0; if (type == track_audio) idx = 0; else if (type == track_video) @@ -709,6 +711,7 @@ void generic_packetizer_c::parse_ext_timecode_file(const char *name) { bool done; double default_fps; + in = NULL; try { in = new mm_text_io_c(name); } catch(...) { @@ -890,6 +893,7 @@ bool generic_reader_c::demuxing_requested(char type, int64_t id) { vector *tracks; int i; + tracks = NULL; if (type == 'v') { if (ti->no_video) return false;