mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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
This commit is contained in:
parent
1b8b121fb6
commit
1c0e205fab
@ -61,7 +61,7 @@ void audio_encode_example(const char *filename)
|
|||||||
outbuf_size = 10000;
|
outbuf_size = 10000;
|
||||||
outbuf = malloc(outbuf_size);
|
outbuf = malloc(outbuf_size);
|
||||||
|
|
||||||
f = fopen(filename, "w");
|
f = fopen(filename, "wb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
fprintf(stderr, "could not open %s\n", filename);
|
fprintf(stderr, "could not open %s\n", filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -122,12 +122,12 @@ void audio_decode_example(const char *outfilename, const char *filename)
|
|||||||
|
|
||||||
outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
|
outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
|
||||||
|
|
||||||
f = fopen(filename, "r");
|
f = fopen(filename, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
fprintf(stderr, "could not open %s\n", filename);
|
fprintf(stderr, "could not open %s\n", filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
outfile = fopen(outfilename, "w");
|
outfile = fopen(outfilename, "wb");
|
||||||
if (!outfile) {
|
if (!outfile) {
|
||||||
free(c);
|
free(c);
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -208,7 +208,7 @@ void video_encode_example(const char *filename)
|
|||||||
|
|
||||||
/* the codec gives us the frame size, in samples */
|
/* the codec gives us the frame size, in samples */
|
||||||
|
|
||||||
f = fopen(filename, "w");
|
f = fopen(filename, "wb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
fprintf(stderr, "could not open %s\n", filename);
|
fprintf(stderr, "could not open %s\n", filename);
|
||||||
exit(1);
|
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 */
|
/* the codec gives us the frame size, in samples */
|
||||||
|
|
||||||
f = fopen(filename, "r");
|
f = fopen(filename, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
fprintf(stderr, "could not open %s\n", filename);
|
fprintf(stderr, "could not open %s\n", filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user