[vlc-devel] [PATCH] es_format: fix self-assignment
Rémi Denis-Courmont
remi at remlab.net
Fri Jan 5 12:51:47 CET 2018
Le 5 janvier 2018 15:21:46 GMT+08:00, Zhao Zhili <quinkblack at foxmail.com> a écrit :
>---
> 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
>
>
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
The case of in == out is not permitted by the function prototype, so it makes no sense to handle it, AFAICT.
--
Remi Denis-Courmont
More information about the vlc-devel
mailing list