@@ -358,7 +358,7 @@ int main(int argc, char** argv)
358
358
uint64_t now_time = SDL_GetTicks64 ();
359
359
uint64_t elapsed_time = (now_time - start_time);
360
360
if (elapsed_time < next_frame_pts) {
361
- SDL_Delay (next_frame_pts - elapsed_time);
361
+ SDL_Delay ((Uint32)( next_frame_pts - elapsed_time) );
362
362
}
363
363
364
364
next_frame_pts += static_cast <uint64_t >(static_cast <double >(duration_ms) / option_speedup);
@@ -371,7 +371,7 @@ int main(int argc, char** argv)
371
371
const uint8_t * p_Cb = heif_image_get_plane_readonly2 (out_image, heif_channel_Cb, &stride_Cb);
372
372
const uint8_t * p_Cr = heif_image_get_plane_readonly2 (out_image, heif_channel_Cr, &stride_Cr);
373
373
374
- sdlWindow.display (p_Y, p_Cb, p_Cr, stride_Y, stride_Cb);
374
+ sdlWindow.display (p_Y, p_Cb, p_Cr, static_cast < int >( stride_Y), static_cast < int >( stride_Cb) );
375
375
376
376
if (show_frame_number) {
377
377
std::cout << " --- frame " << frameNr << " \n " ;
@@ -411,11 +411,11 @@ int main(int argc, char** argv)
411
411
412
412
// --- show metadata
413
413
414
- while (metadata_sample && metadata_sample_display_time / option_speedup <= elapsed_time) {
414
+ while (metadata_sample && static_cast < uint64_t >(( double ) metadata_sample_display_time / option_speedup) <= elapsed_time) {
415
415
size_t size;
416
416
const uint8_t * data = heif_raw_sequence_sample_get_data (metadata_sample, &size);
417
417
418
- std::cout << " timestamp: " << metadata_sample_display_time/1000 .0f << " sec\n " ;
418
+ std::cout << " timestamp: " << (( double ) metadata_sample_display_time) /1000 .0f << " sec\n " ;
419
419
420
420
if (option_metadata_output == metadata_output_text) {
421
421
std::cout << ((const char *) data) << " \n " ;
@@ -425,9 +425,9 @@ int main(int argc, char** argv)
425
425
std::cout << ' \n ' ;
426
426
}
427
427
428
- uint64_t timescale = heif_track_get_timescale (metadata_track);
429
- uint32_t duration = heif_raw_sequence_sample_get_duration (metadata_sample);
430
- metadata_sample_display_time += duration * 1000 / timescale ;
428
+ uint64_t metadata_timescale = heif_track_get_timescale (metadata_track);
429
+ uint32_t metadata_duration = heif_raw_sequence_sample_get_duration (metadata_sample);
430
+ metadata_sample_display_time += metadata_duration * 1000 / metadata_timescale ;
431
431
432
432
heif_raw_sequence_sample_release (metadata_sample);
433
433
metadata_sample = nullptr ;
0 commit comments