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
c2d2e2bb
Commit
c2d2e2bb
authored
Sep 27, 2009
by
Alexis Ballier
Committed by
Rémi Denis-Courmont
Oct 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l: attempt to fix strict aliasing warnings.
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
1fb78f47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
modules/access/v4l.c
modules/access/v4l.c
+12
-12
No files found.
modules/access/v4l.c
View file @
c2d2e2bb
...
...
@@ -837,7 +837,7 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
* or height */
if
(
p_sys
->
b_mjpeg
)
{
struct
quicktime_mjpeg_app1
*
p_app1
;
struct
quicktime_mjpeg_app1
p_app1
;
int32_t
i_offset
;
if
(
ioctl
(
i_fd
,
MJPIOC_G_PARAMS
,
&
mjpeg
)
<
0
)
...
...
@@ -859,12 +859,11 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
mjpeg
.
APP_len
=
40
;
/* aligned */
p_app1
=
(
struct
quicktime_mjpeg_app1
*
)
mjpeg
.
APP_data
;
p_app1
->
i_reserved
=
0
;
p_app1
->
i_tag
=
VLC_FOURCC
(
'm'
,
'j'
,
'p'
,
'g'
);
p_app1
->
i_field_size
=
0
;
p_app1
->
i_padded_field_size
=
0
;
p_app1
->
i_next_field
=
0
;
p_app1
.
i_reserved
=
0
;
p_app1
.
i_tag
=
VLC_FOURCC
(
'm'
,
'j'
,
'p'
,
'g'
);
p_app1
.
i_field_size
=
0
;
p_app1
.
i_padded_field_size
=
0
;
p_app1
.
i_next_field
=
0
;
/* XXX WARNING XXX */
/* these's nothing magic about these values. We are dangerously
* assuming the encoder card is encoding mjpeg-a and is not throwing
...
...
@@ -876,15 +875,16 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
* does conform to standards outside of Apple Quicktime.
*/
i_offset
=
0x2e
;
p_app1
->
i_DQT_offset
=
hton32
(
i_offset
);
p_app1
.
i_DQT_offset
=
hton32
(
i_offset
);
i_offset
=
0xb4
;
p_app1
->
i_DHT_offset
=
hton32
(
i_offset
);
p_app1
.
i_DHT_offset
=
hton32
(
i_offset
);
i_offset
=
0x258
;
p_app1
->
i_SOF_offset
=
hton32
(
i_offset
);
p_app1
.
i_SOF_offset
=
hton32
(
i_offset
);
i_offset
=
0x26b
;
p_app1
->
i_SOS_offset
=
hton32
(
i_offset
);
p_app1
.
i_SOS_offset
=
hton32
(
i_offset
);
i_offset
=
0x279
;
p_app1
->
i_data_offset
=
hton32
(
i_offset
);
p_app1
.
i_data_offset
=
hton32
(
i_offset
);
memcpy
(
mjpeg
.
APP_data
,
&
p_app1
,
sizeof
(
struct
quicktime_mjpeg_app1
));
/* SOF and SOS aren't specified by the mjpeg API because they aren't
* optional. They will be present in the output. */
...
...
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