Merge remote-tracking branch 'origin/main' into v2.17.x
authorCarl Hetherington <cth@carlh.net>
Fri, 29 Mar 2024 23:00:44 +0000 (00:00 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 29 Mar 2024 23:00:44 +0000 (00:00 +0100)
src/lib/ffmpeg_examiner.cc

index f7d3f9df334b8d92f00c93adc456c08b587cec30..d173c6bb660cd12415285721bad4f068e68a982f 100644 (file)
@@ -186,7 +186,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                        _rotation = - av_display_rotation_get(reinterpret_cast<int32_t*>(side_data->data));
                }
 
-               _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);