disable encoders where appropriate (patch courtesy of BERO
[ffmpeg.git] / libavformat / mpjpeg.c
index f5ff451..434e519 100644 (file)
 
 #define BOUNDARY_TAG "ffserver"
 
+#ifdef CONFIG_ENCODERS
 static int mpjpeg_write_header(AVFormatContext *s)
 {
-    UINT8 buf1[256];
+    uint8_t buf1[256];
 
     snprintf(buf1, sizeof(buf1), "--%s\n", BOUNDARY_TAG);
     put_buffer(&s->pb, buf1, strlen(buf1));
@@ -33,9 +34,9 @@ static int mpjpeg_write_header(AVFormatContext *s)
 }
 
 static int mpjpeg_write_packet(AVFormatContext *s, int stream_index, 
-                               UINT8 *buf, int size, int force_pts)
+                               const uint8_t *buf, int size, int64_t pts)
 {
-    UINT8 buf1[256];
+    uint8_t buf1[256];
 
     snprintf(buf1, sizeof(buf1), "Content-type: image/jpeg\n\n");
     put_buffer(&s->pb, buf1, strlen(buf1));
@@ -75,7 +76,7 @@ static int single_jpeg_write_header(AVFormatContext *s)
 }
 
 static int single_jpeg_write_packet(AVFormatContext *s, int stream_index,
-                            UINT8 *buf, int size, int force_pts)
+                                    const uint8_t *buf, int size, int64_t pts)
 {
     put_buffer(&s->pb, buf, size);
     put_flush_packet(&s->pb);
@@ -106,3 +107,4 @@ int jpeg_init(void)
     av_register_output_format(&single_jpeg_format);
     return 0;
 }
+#endif //CONFIG_ENCODERS