[vlc-devel] [PATCH] es_format: fix self-assignment

Zhao Zhili quinkblack at foxmail.com
Fri Jan 5 08:21:46 CET 2018


---
 src/misc/es_format.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index 1c9a78e..04fe165 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -376,7 +376,8 @@ void video_format_TransformTo( video_format_t *restrict fmt,
 void video_format_ApplyRotation( video_format_t *restrict out,
                                  const video_format_t *restrict in )
 {
-    *out = *in;
+    if( out != in )
+        *out = *in;
 
     video_format_TransformTo(out, ORIENT_NORMAL);
 }
-- 
2.7.4





More information about the vlc-devel mailing list