|
83 | 83 | struct state_video_compress_cineform{ |
84 | 84 | std::mutex mutex; |
85 | 85 |
|
86 | | - struct video_desc saved_desc; |
87 | | - struct video_desc precompress_desc; |
88 | | - struct video_desc compressed_desc; |
| 86 | + video_desc saved_desc = {}; |
| 87 | + video_desc precompress_desc = {}; |
| 88 | + video_desc compressed_desc = {}; |
89 | 89 |
|
90 | | - decoder_t dec; |
| 90 | + decoder_t dec = {}; |
91 | 91 |
|
92 | | - CFHD_EncodingQuality requested_quality; |
93 | | - int requested_threads; |
94 | | - int requested_pool_size; |
| 92 | + CFHD_EncodingQuality requested_quality = CFHD_ENCODING_QUALITY_DEFAULT; |
| 93 | + int requested_threads = DEFAULT_THREAD_COUNT; |
| 94 | + int requested_pool_size = DEFAULT_POOL_SIZE; |
95 | 95 |
|
96 | | - CFHD_EncoderPoolRef encoderPoolRef; |
97 | | - CFHD_MetadataRef metadataRef; |
| 96 | + CFHD_EncoderPoolRef encoderPoolRef = nullptr; |
| 97 | + CFHD_MetadataRef metadataRef = nullptr; |
98 | 98 |
|
99 | | - uint32_t frame_seq_in; |
100 | | - uint32_t frame_seq_out; |
| 99 | + uint32_t frame_seq_in = 0; |
| 100 | + uint32_t frame_seq_out = 0; |
101 | 101 |
|
102 | 102 | std::queue<std::unique_ptr<video_frame, decltype(&vf_free)>> frame_queue; |
103 | 103 |
|
104 | | - bool started; |
105 | | - bool stop; |
| 104 | + bool started = false; |
| 105 | + bool stop = false; |
106 | 106 | std::condition_variable cv; |
107 | 107 |
|
108 | 108 | #ifdef MEASUREMENT |
@@ -191,11 +191,6 @@ static void * cineform_compress_init(struct module *parent, const char *opts) |
191 | 191 |
|
192 | 192 | s = new state_video_compress_cineform(); |
193 | 193 |
|
194 | | - memset(&s->saved_desc, 0, sizeof(s->saved_desc)); |
195 | | - s->requested_quality = CFHD_ENCODING_QUALITY_DEFAULT; |
196 | | - s->requested_threads = DEFAULT_THREAD_COUNT; |
197 | | - s->requested_pool_size = DEFAULT_POOL_SIZE; |
198 | | - |
199 | 194 | char *fmt = strdup(opts); |
200 | 195 | int ret = parse_fmt(s, fmt); |
201 | 196 | free(fmt); |
|
0 commit comments