Mercurial > libavcodec.hg
changeset 1931:902556e6d21d libavcodec
writing corrupt files on MinGW patch by (Matthias Fritschi <choi at netlabs dot org>)
author | michael |
---|---|
date | Fri, 09 Apr 2004 15:04:51 +0000 |
parents | 01d6dc162ace |
children | 7f437fe3fbc6 |
files | apiexample.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/apiexample.c Fri Apr 09 14:57:39 2004 +0000 +++ b/apiexample.c Fri Apr 09 15:04:51 2004 +0000 @@ -61,7 +61,7 @@ outbuf_size = 10000; outbuf = malloc(outbuf_size); - f = fopen(filename, "w"); + f = fopen(filename, "wb"); if (!f) { fprintf(stderr, "could not open %s\n", filename); exit(1); @@ -122,12 +122,12 @@ outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); - f = fopen(filename, "r"); + f = fopen(filename, "rb"); if (!f) { fprintf(stderr, "could not open %s\n", filename); exit(1); } - outfile = fopen(outfilename, "w"); + outfile = fopen(outfilename, "wb"); if (!outfile) { free(c); exit(1); @@ -208,7 +208,7 @@ /* the codec gives us the frame size, in samples */ - f = fopen(filename, "w"); + f = fopen(filename, "wb"); if (!f) { fprintf(stderr, "could not open %s\n", filename); exit(1); @@ -333,7 +333,7 @@ /* the codec gives us the frame size, in samples */ - f = fopen(filename, "r"); + f = fopen(filename, "rb"); if (!f) { fprintf(stderr, "could not open %s\n", filename); exit(1);