diff options
author | Matthias Fritschi <choi@netlabs.org> | 2004-04-09 15:04:51 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-09 15:04:51 +0000 |
commit | 1c0e205fab4bd5bbfa0399af2cd5e281b414b3d5 (patch) | |
tree | 740c912493db98baf2f00049830f771665c2693a /libavcodec/apiexample.c | |
parent | 1b8b121fb64c48a6f14c15967a55c910b52918df (diff) | |
download | ffmpeg-1c0e205fab4bd5bbfa0399af2cd5e281b414b3d5.tar.gz |
writing corrupt files on MinGW patch by (Matthias Fritschi <choi at netlabs dot org>)
Originally committed as revision 2988 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/apiexample.c')
-rw-r--r-- | libavcodec/apiexample.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/apiexample.c b/libavcodec/apiexample.c index dd4d6dfd4d..a2ee99dfc1 100644 --- a/libavcodec/apiexample.c +++ b/libavcodec/apiexample.c @@ -61,7 +61,7 @@ void audio_encode_example(const char *filename) 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 @@ void audio_decode_example(const char *outfilename, const char *filename) 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 @@ void video_encode_example(const char *filename) /* 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 @@ void video_decode_example(const char *outfilename, const char *filename) /* 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); |