From 5693da40bc5133a76b735f4f151ac8cb64e32376 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 11 Mar 2004 11:19:37 +0000 Subject: [PATCH] Messed around with jpeg stream header. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@943 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_event.cpp | 2 +- src/zm_monitor.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 298b47795..7be82a716 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -466,7 +466,7 @@ void Event::StreamEvent( int event_id, int rate, int scale ) write( fileno(stdout), buffer, n_bytes ); } - fprintf( stdout, "\r\n--ZoneMinderFrame\r\n" ); + fprintf( stdout, "--ZoneMinderFrame\r\n" ); fprintf( stdout, "Content-length: %d\r\n", n_bytes ); fprintf( stdout, "Content-type: image/jpeg\r\n\r\n" ); fflush( stdout ); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 86952752c..bb536a6e5 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1125,9 +1125,9 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt scaled_image.EncodeJpeg( img_buffer, &img_buffer_size ); } - fprintf( stdout, "\r\n--ZoneMinderFrame\r\n" ); - fprintf( stdout, "Content-type: image/jpeg\r\n" ); - fprintf( stdout, "Content-length: %d\r\n\r\n", img_buffer_size ); + fprintf( stdout, "--ZoneMinderFrame\r\n" ); + fprintf( stdout, "Content-length: %d\r\n", img_buffer_size ); + fprintf( stdout, "Content-type: image/jpeg\r\n\r\n" ); fwrite( img_buffer, img_buffer_size, 1, stdout ); } usleep( refresh*1000 );