]> git.sesse.net Git - x264/commitdiff
Mark cli_input/output_t variables as const when possible
authorAlexander Strange <astrange@ithinksw.com>
Sat, 13 Feb 2010 07:22:04 +0000 (02:22 -0500)
committerFiona Glaser <fiona@x264.com>
Mon, 15 Feb 2010 09:00:01 +0000 (01:00 -0800)
input/avs.c
input/ffms.c
input/input.h
input/lavf.c
input/y4m.c
input/yuv.c
output/flv.c
output/matroska.c
output/mp4.c
output/output.h
output/raw.c

index 522f8fed55e39d2538f4a7957c7956b5241f2482..79b5c80a00ab19eaa902244ee42813ecbef5a200 100644 (file)
@@ -313,4 +313,4 @@ static int close_file( hnd_t handle )
     return 0;
 }
 
-cli_input_t avs_input = { open_file, get_frame_total, picture_alloc, read_frame, release_frame, picture_clean, close_file };
+const cli_input_t avs_input = { open_file, get_frame_total, picture_alloc, read_frame, release_frame, picture_clean, close_file };
index b6809671b5cc99613e34e862c7507eec3812e170..14962c74f57f5d944bb53d5f43bd471698067fe1 100644 (file)
@@ -244,4 +244,4 @@ static int close_file( hnd_t handle )
     return 0;
 }
 
-cli_input_t ffms_input = { open_file, get_frame_total, x264_picture_alloc, read_frame, NULL, x264_picture_clean, close_file };
+const cli_input_t ffms_input = { open_file, get_frame_total, x264_picture_alloc, read_frame, NULL, x264_picture_clean, close_file };
index 9fb425c6e3d406f051428854431cb202d842dd3b..6e386f4da43cde9517fe354f101a2ea18b1f4123 100644 (file)
@@ -60,11 +60,11 @@ typedef struct
     int (*close_file)( hnd_t handle );
 } cli_input_t;
 
-extern cli_input_t yuv_input;
-extern cli_input_t y4m_input;
-extern cli_input_t avs_input;
+extern const cli_input_t yuv_input;
+extern const cli_input_t y4m_input;
+extern const cli_input_t avs_input;
 extern cli_input_t thread_input;
-extern cli_input_t lavf_input;
-extern cli_input_t ffms_input;
+extern const cli_input_t lavf_input;
+extern const cli_input_t ffms_input;
 
 #endif
index 180e509f46c65ea7460085177084be676d2cd3a5..6ecc6b02a0ef43e6b4601c7f06d8a8d60855306e 100644 (file)
@@ -269,4 +269,4 @@ static int close_file( hnd_t handle )
     return 0;
 }
 
-cli_input_t lavf_input = { open_file, get_frame_total, picture_alloc, read_frame, NULL, picture_clean, close_file };
+const cli_input_t lavf_input = { open_file, get_frame_total, picture_alloc, read_frame, NULL, picture_clean, close_file };
index 1619f746c197166b0d58d6d614009bd820653195..8645ff7c7c34f34e114a615b4b27da1792b42d1b 100644 (file)
@@ -242,4 +242,4 @@ static int close_file( hnd_t handle )
     return 0;
 }
 
-cli_input_t y4m_input = { open_file, get_frame_total, x264_picture_alloc, read_frame, NULL, x264_picture_clean, close_file };
+const cli_input_t y4m_input = { open_file, get_frame_total, x264_picture_alloc, read_frame, NULL, x264_picture_clean, close_file };
index dbd03178dca2afc256698c52c35f9755bcc18634..3e39e07f2276e5c21769557a886466bf8a4396ae 100644 (file)
@@ -125,4 +125,4 @@ static int close_file( hnd_t handle )
     return 0;
 }
 
-cli_input_t yuv_input = { open_file, get_frame_total, x264_picture_alloc, read_frame, NULL, x264_picture_clean, close_file };
+const cli_input_t yuv_input = { open_file, get_frame_total, x264_picture_alloc, read_frame, NULL, x264_picture_clean, close_file };
index b3e5d16dd6cf1a68c88fe2616793d8893b4509ff..2e0a0e47a8d2e54faf2a385147a3ab08509486ed 100644 (file)
@@ -305,4 +305,4 @@ static int close_file( hnd_t handle, int64_t largest_pts, int64_t second_largest
     return 0;
 }
 
-cli_output_t flv_output = { open_file, set_param, write_headers, write_frame, close_file };
+const cli_output_t flv_output = { open_file, set_param, write_headers, write_frame, close_file };
index b1805e41c4c3170766f22fedde084553344a14b9..fb39ced035df7cba432272b8060192f7dc7624c7 100644 (file)
@@ -206,4 +206,4 @@ static int close_file( hnd_t handle, int64_t largest_pts, int64_t second_largest
     return ret;
 }
 
-cli_output_t mkv_output = { open_file, set_param, write_headers, write_frame, close_file };
+const cli_output_t mkv_output = { open_file, set_param, write_headers, write_frame, close_file };
index b817c820c10a7bc3a57f96730339bac751231266..b99eaed0ca029275e644a1fad24ca1fbcafe0ccf 100644 (file)
@@ -298,4 +298,4 @@ static int write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_picture_
     return i_size;
 }
 
-cli_output_t mp4_output = { open_file, set_param, write_headers, write_frame, close_file };
+const cli_output_t mp4_output = { open_file, set_param, write_headers, write_frame, close_file };
index 851b81933df31bdd50c9bd468e60505ecd827c07..c79b48e487f9dcf3291b8815e16a554dcaeb46d1 100644 (file)
@@ -33,9 +33,9 @@ typedef struct
     int (*close_file)( hnd_t handle, int64_t largest_pts, int64_t second_largest_pts );
 } cli_output_t;
 
-extern cli_output_t raw_output;
-extern cli_output_t mkv_output;
-extern cli_output_t mp4_output;
-extern cli_output_t flv_output;
+extern const cli_output_t raw_output;
+extern const cli_output_t mkv_output;
+extern const cli_output_t mp4_output;
+extern const cli_output_t flv_output;
 
 #endif
index a4d11756aa6e5535cce64ffd67a924e6c9165ff8..02e4c56a81776ac96f854ab002ab24ebb165318f 100644 (file)
@@ -62,5 +62,5 @@ static int close_file( hnd_t handle, int64_t largest_pts, int64_t second_largest
     return fclose( (FILE*)handle );
 }
 
-cli_output_t raw_output = { open_file, set_param, write_headers, write_frame, close_file };
+const cli_output_t raw_output = { open_file, set_param, write_headers, write_frame, close_file };