[vlc-commits] input/control: remove unnecessar memory allocation
Filip Roséen
git at videolan.org
Wed Mar 1 17:43:20 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar 1 09:52:05 2017 +0100| [d1feba6e5f90e48e41cc507ab574f3a1091047f5] | committer: Jean-Baptiste Kempf
input/control: remove unnecessar memory allocation
We do not need to duplicate the input_title_t in question as we are
only reading from the source object. These changes also fixes a
memory-leak given that p_title was never freed.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1feba6e5f90e48e41cc507ab574f3a1091047f5
---
src/input/control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/input/control.c b/src/input/control.c
index e662a23..860ff24 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -399,7 +399,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
return VLC_EGENERIC;
}
- input_title_t *p_title = vlc_input_title_Duplicate( priv->title[*pi_title_to_fetch] );
+ input_title_t *p_title = priv->title[*pi_title_to_fetch];
/* set arg2 to the number of seekpoints we found */
const int i_chapters = p_title->i_seekpoint;
More information about the vlc-commits
mailing list