Fix crash introduced in previous commit.
authorCarl Hetherington <cth@carlh.net>
Fri, 29 Mar 2024 22:58:36 +0000 (23:58 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 29 Mar 2024 22:58:36 +0000 (23:58 +0100)
src/lib/ffmpeg_examiner.cc

index 787198e4a477417570880bfdfe11bc8322ccf017..51ade8e89cb844336baa4dfac51ef56be3f4fbea 100644 (file)
@@ -195,7 +195,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                        _rotation = - av_display_rotation_get ((int32_t*) displaymatrix);
                }
 
-               _rotation = *_rotation - 360 * floor (*_rotation / 360 + 0.9 / 360);
+               if (_rotation) {
+                       _rotation = *_rotation - 360 * floor (*_rotation / 360 + 0.9 / 360);
+               }
        }
 
        LOG_GENERAL("Temporal reference was %1", temporal_reference);