From: Philip de N. <ph...@us...> - 2012-02-20 10:23:27
|
Update of /cvsroot/ingex/ingex/libMXF/examples/writeavidmxf In directory vz-cvs-4.sog:/tmp/cvs-serv7731/examples/writeavidmxf Modified Files: main.c Log Message: writeavidmxf: check whether wav input has fmt and data chunks Also fixes variable not used warnings Index: main.c =================================================================== RCS file: /cvsroot/ingex/ingex/libMXF/examples/writeavidmxf/main.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** main.c 10 Nov 2011 10:27:37 -0000 1.29 --- main.c 20 Feb 2012 10:23:24 -0000 1.30 *************** *** 568,571 **** --- 568,582 ---- } + if (!haveFormatData) + { + fprintf(stderr, "Missing 'fmt ' chunk in wav file\n"); + return 0; + } + if (!haveWAVEData) + { + fprintf(stderr, "Missing 'data' chunk in wav file\n"); + return 0; + } + /* position at wave data */ if (rf_seek(input->file, input->dataOffset, SEEK_SET) < 0) |