ffmpeg | branch: master | James Almer <[email protected]> | Wed Sep  8 15:34:24 
2021 -0300| [a8bd8d46f9d32582c5b89cdc57f9cb7169e94066] | committer: James Almer

cmdutils: round rotation value to nearest integer

As recommended by the doxy for av_display_rotation_get().

Signed-off-by: James Almer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a8bd8d46f9d32582c5b89cdc57f9cb7169e94066
---

 fftools/cmdutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index ac172dbd65..7e9c4299fa 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -2207,7 +2207,7 @@ double get_rotation(AVStream *st)
                                                      
AV_PKT_DATA_DISPLAYMATRIX, NULL);
     double theta = 0;
     if (displaymatrix)
-        theta = -av_display_rotation_get((int32_t*) displaymatrix);
+        theta = -round(av_display_rotation_get((int32_t*) displaymatrix));
 
     theta -= 360*floor(theta/360 + 0.9/360);
 

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to