https://github.com/ImageMagick/ImageMagick/discussions/1949
diff --git a/ChangeLog b/ChangeLog
index 5a715e1..44ce0fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
2020-04-27 7.0.10-10 Cristy <quetzlzacatenango@image...>
* Correction to allocate a colormap of the maximum colors when color
reducing an image sequence.
+ * Write to stdout for mp4:-.
2020-04-25 7.0.10-9 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.10-9, GIT revision 17190:13fdcd1:20200426.
diff --git a/coders/mpeg.c b/coders/mpeg.c
index 260b561..d94a2bd 100644
--- a/coders/mpeg.c
+++ b/coders/mpeg.c
@@ -425,7 +425,11 @@
/*
Copy source file to destination.
*/
- destination_file=open_utf8(destination,O_WRONLY | O_BINARY | O_CREAT,S_MODE);
+ if (strcmp(destination,"-") == 0)
+ destination_file=fileno(stdout);
+ else
+ destination_file=open_utf8(destination,O_WRONLY | O_BINARY | O_CREAT,
+ S_MODE);
if (destination_file == -1)
return(MagickFalse);
source_file=open_utf8(source,O_RDONLY | O_BINARY,0);
@@ -456,7 +460,8 @@
if ((size_t) count != length)
break;
}
- (void) close(destination_file);
+ if (strcmp(destination,"-") != 0)
+ (void) close(destination_file);
(void) close(source_file);
buffer=(unsigned char *) RelinquishMagickMemory(buffer);
return(i != 0 ? MagickTrue : MagickFalse);