/*
- * PPM Video Hook
+ * PPM Video Hook
* Copyright (c) 2003 Charles Yates
*
* This library is free software; you can redistribute it and/or
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
close( output[ 0 ] );
close( output[ 1 ] );
- execl("/bin/sh", "sh", "-c", command, NULL );
+ execl("/bin/sh", "sh", "-c", command, (char*)NULL );
exit( 255 );
}
else
int c = 0;
FILE *in = rwpipe_reader( rw );
- do
+ do
{
c = fgetc( in );
/** Context info for this vhook - stores the pipe and image buffers.
*/
-typedef struct
+typedef struct
{
rwpipe *rw;
int size1;
char *buf1;
int size2;
char *buf2;
-}
+}
ContextInfo;
/** Initialise the context info for this vhook.
err = 1;
/* Convert to RGB24 if necessary */
- if ( !err && pix_fmt != PIX_FMT_RGB24 )
+ if ( !err && pix_fmt != PIX_FMT_RGB24 )
{
int size = avpicture_get_size(PIX_FMT_RGB24, width, height);
if ( !err )
{
/* Actually, this is wrong, since the out_width/out_height returned from the
- * filter won't necessarily be the same as width and height - img_resample
- * won't scale rgb24, so the only way out of this is to convert to something
- * that img_resample does like [which may or may not be pix_fmt], rescale
+ * filter won't necessarily be the same as width and height - img_resample
+ * won't scale rgb24, so the only way out of this is to convert to something
+ * that img_resample does like [which may or may not be pix_fmt], rescale
* and finally convert to pix_fmt... slow, but would provide the most flexibility.
*
* Currently, we take the upper left width/height pixels from the filtered image,
* are gracefully ignored and the original image is returned - in this case, a
* failure may corrupt the input.
*/
- if (img_convert(picture, pix_fmt, &picture2, PIX_FMT_RGB24, width, height) < 0)
+ if (img_convert(picture, pix_fmt, &picture2, PIX_FMT_RGB24, width, height) < 0)
{
}
}