Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
efd7d3f6
Commit
efd7d3f6
authored
Sep 21, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mjpeg: Yoda code usage avoiding you will
parent
0cabddab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
modules/demux/mjpeg.c
modules/demux/mjpeg.c
+4
-4
No files found.
modules/demux/mjpeg.c
View file @
efd7d3f6
...
...
@@ -149,7 +149,7 @@ static char* GetLine( demux_t *p_demux, int *p_pos )
}
}
*
p_pos
+=
(
i
+
1
);
if
(
i
>
0
&&
'\r'
==
p_buf
[
i
-
1
]
)
if
(
i
>
0
&&
p_buf
[
i
-
1
]
==
'\r'
)
{
i
--
;
}
...
...
@@ -347,7 +347,7 @@ static int Open( vlc_object_t * p_this )
p_demux
->
pf_demux
=
MimeDemux
;
stream_Read
(
p_demux
->
s
,
NULL
,
i_size
);
}
else
if
(
0
==
i_size
)
else
if
(
i_size
==
0
)
{
/* 0xffd8 identify a JPEG SOI */
if
(
p_sys
->
p_peek
[
0
]
==
0xFF
&&
p_sys
->
p_peek
[
1
]
==
0xD8
)
...
...
@@ -424,9 +424,9 @@ static int MjpgDemux( demux_t *p_demux )
}
i
=
3
;
FIND_NEXT_EOI:
while
(
!
(
0xFF
==
p_sys
->
p_peek
[
i
-
1
]
&&
0xD9
==
p_sys
->
p_peek
[
i
]
)
)
while
(
!
(
p_sys
->
p_peek
[
i
-
1
]
==
0xFF
&&
p_sys
->
p_peek
[
i
]
==
0xD9
)
)
{
if
(
0xFF
==
p_sys
->
p_peek
[
i
-
1
]
&&
0xD8
==
p_sys
->
p_peek
[
i
]
)
if
(
p_sys
->
p_peek
[
i
-
1
]
==
0xFF
&&
p_sys
->
p_peek
[
i
]
==
0xD9
)
{
p_sys
->
i_level
++
;
msg_Dbg
(
p_demux
,
"we found another JPEG SOI at %d"
,
i
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment