[vlc-devel] [PATCH] support old style separators

David R Robison drrobison at openroadsconsulting.com
Wed Aug 28 20:12:00 CEST 2013


OK, I've fixed the mode problem and verified that my conditionals were 
correct the first time. We have tested this fix with several MJPEG 
cameras including different versions of the IQEye camera which has this 
issue. Can this patch be included into VLC?
David
Ps. I changed the subject line to better match the change being made

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

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index 8def7f8..c449ada 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -508,8 +508,13 @@ 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 ) ) )
+        /* Handle old and new style of separators */
+        if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i 
+ 2),
+                      strlen( p_sys->psz_separator ) )
+                      || ((strlen( p_sys->psz_separator ) > 4)
+                      && !strncmp(p_sys->psz_separator, "--", 2)
+                      && !strncmp( p_sys->psz_separator, (char 
*)(p_sys->p_peek + i),
+                      strlen( p_sys->psz_separator ) ) ) )
          {
              break;
          }
-- 
1.7.9.5



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