[vlc-devel] [bug],NumInRange(), i_stop always < 0

Andy chenee chenee543216 at gmail.com
Thu Sep 3 19:37:08 CEST 2009


HI all:
maybe it's a bug;
this cmd below will find _NO_ es at all, but select="es=1,es=2" work.

>vlc /tmp/2.avi --sout '#duplicate{dst=display,select="es=1-2"}'

---------------------patch begin -------------------
>From cfd7963380f1db2ab122676cf0fe4764ef94e938 Mon Sep 17 00:00:00 2001
From: chenee <chenee543216 at gmail.com>
Date: Fri, 4 Sep 2009 01:21:52 +0800
Subject: [PATCH] duplicate.c:fix bug of NumInRange(), i_stop always < 0

---
 modules/stream_out/duplicate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stream_out/duplicate.c b/modules/stream_out/duplicate.c
index d1939fc..6a50fdc 100644
--- a/modules/stream_out/duplicate.c
+++ b/modules/stream_out/duplicate.c
@@ -310,7 +310,7 @@ static bool NumInRange( char *psz_range, int i_num )
         i_start = strtol( psz_range, &end, 0 );
         if( end == psz_range ) i_start = i_num;

-        i_stop  = strtol( psz,       &end, 0 );
+        i_stop  = strtol( psz+1,       &end, 0 );
         if( end == psz_range ) i_stop = i_num;
     }
     else
-- 
1.6.0.4

---------------------patch end-----------------
HHCN Andy chenee at hhcn.com
Tel/Fax: +86-551-5325652,5325653-820
Products Info. : http://www.hhcn.com
Tech. Support  : http://www.hhcn.org
HHTech : An Embedded Linux Tech. Provider in Mainland China
2008-08-13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090904/56989816/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-duplicate.c-fix-bug-of-NumInRange-i_stop-always.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090904/56989816/attachment.bin>


More information about the vlc-devel mailing list