[vlc-commits] subtitles: use atoi as appropriate

Jean-Baptiste Kempf git at videolan.org
Wed Jun 29 18:09:06 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jun 29 16:38:14 2016 +0200| [f69f01d9fd8bd31acc23e5d8bcd71d27157803ff] | committer: Jean-Baptiste Kempf

subtitles: use atoi as appropriate

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

 modules/codec/subsdec.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index e8f9b87..08accc1 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -991,8 +991,7 @@ static text_segment_t* ParseSubtitles( int *pi_align, const char *psz_subtitle )
             }
             else if( psz_subtitle[1] == 'S' || psz_subtitle[1] == 's' )
             {
-                char *value = strndup( &psz_subtitle[3], i_len );
-                int size = atoi( value );
+                int size = atoi( &psz_subtitle[3] );
                 if( size )
                 {
                     p_segment = NewTextSegmentPushStyle( p_segment, &p_stack );



More information about the vlc-commits mailing list