[vlc-commits] mjpeg: minor cosmetics

Hugo Beauzée-Luyssen git at videolan.org
Fri Sep 21 17:23:47 CEST 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Sep 21 17:22:11 2012 +0300| [a9ebdde488ca7bb580d84b9cd742261ad6451afd] | committer: Hugo Beauzée-Luyssen

mjpeg: minor cosmetics

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

 modules/demux/mjpeg.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index e87899e..cf9d659 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -148,17 +148,16 @@ static char* GetLine( demux_t *p_demux, int *p_pos )
             i_size = p_sys->i_data_peeked - *p_pos;
         }
     }
-    *p_pos += ( i + 1 );
+    *p_pos += i + 1;
     if( i > 0 && p_buf[i - 1] == '\r' )
     {
         i--;
     }
     p_line = malloc( i + 1 );
-    if( p_line == NULL )
+    if( unlikely( p_line == NULL ) )
         return NULL;
     strncpy ( p_line, (char*)p_buf, i );
     p_line[i] = '\0';
-//    msg_Dbg( p_demux, "i = %d, pos = %d, %s", i, *p_pos, p_line );
     return p_line;
 }
 



More information about the vlc-commits mailing list