[vlc-devel] [PATCH] Allow the image separator to be specified on the command line

David R Robison drrobison at openroadsconsulting.com
Thu Aug 22 19:02:58 CEST 2013


OK, here is another try, this change will allow the boundry to be 
something like "--ImageSeparator" and will check for 
+----ImageSeparator" as well as "--ImageSeparator". This handles the 
problem I had with the IQEye camera,

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index fd12973..3a73252 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -517,8 +508,11 @@ static int MimeDemux( demux_t *p_demux )
              }
          }

-        if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i 
+ 2),
-                      strlen( p_sys->psz_separator ) ) )
+        if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i 
+ 2),
+                      strlen( p_sys->psz_separator ) )
+                      || (!strncmp(p_sys->psz_separator, "--", 2)
+                      && !strncmp( p_sys->psz_separator, (char 
*)(p_sys->p_peek + i),
+                      strlen( p_sys->psz_separator ) ) ) )
          {
              break;
          }
-- 

How does this look? David

David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: drrobison at openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526

On 8/22/2013 12:34 PM, David R Robison wrote:
> Good idea, unfortunatly the warning is only given once and then it keeps
> failing to find the separator until it gives up. From the logs:
>
> mjpeg warning: separator ImageSeparator does not match --ImageSeparator
> mjpeg debug: discard MIME header: Content-Length: 7516
> mjpeg debug: MIME boundary not found in 15360 bytes of data
> mjpeg debug: MIME boundary not found in 20480 bytes of data
> mjpeg debug: MIME boundary not found in 25600 bytes of data
> mjpeg debug: MIME boundary not found in 30720 bytes of data
> ...
> mjpeg debug: MIME boundary not found in 1282900 bytes of data
> mjpeg warning: no more data
> mjpeg warning: no more data is available at the moment
>
> This is something that worked in 2.0.8 but not in 2.1.0. Any thoughts?
> David
>
> David R Robison
> Open Roads Consulting, Inc.
> 103 Watson Road, Chesapeake, VA 23320
> phone: (757) 546-3401
> e-mail: drrobison at openroadsconsulting.com
> web: http://openroadsconsulting.com
> blog: http://therobe.blogspot.com
> book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526
>
> On 8/22/2013 11:48 AM, Denis Charmet wrote:
>> Hi,
>> Le jeudi 22 août 2013 à 11:32:39, David Robison a écrit :
>>> Any thoughts on how I might do this?
>> Well there should be a warning if the separators mismatch... one
>> possibility would be to update this separator if there is n separator
>> mismatches with always the same separator and the specified separator was never found before.
>>
>
>
> This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
> If you are not the intended recipient, please delete this email immediately.
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
If you are not the intended recipient, please delete this email immediately.




More information about the vlc-devel mailing list