Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a5e1acf9
Commit
a5e1acf9
authored
Apr 10, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MP4: fill the orientation flag in video_format_t
Ref #2882
parent
70f87448
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+2
-0
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+1
-0
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+16
-0
No files found.
modules/demux/mp4/libmp4.c
View file @
a5e1acf9
...
@@ -736,6 +736,8 @@ static int MP4_ReadBox_tkhd( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -736,6 +736,8 @@ static int MP4_ReadBox_tkhd( stream_t *p_stream, MP4_Box_t *p_box )
if
(
rotation
<
0
)
if
(
rotation
<
0
)
rotation
+=
360
.;
rotation
+=
360
.;
p_box
->
data
.
p_tkhd
->
f_rotation
=
rotation
;
#ifdef MP4_VERBOSE
#ifdef MP4_VERBOSE
MP4_ConvertDate2Str
(
s_creation_time
,
p_box
->
data
.
p_mvhd
->
i_creation_time
);
MP4_ConvertDate2Str
(
s_creation_time
,
p_box
->
data
.
p_mvhd
->
i_creation_time
);
MP4_ConvertDate2Str
(
s_modification_time
,
p_box
->
data
.
p_mvhd
->
i_modification_time
);
MP4_ConvertDate2Str
(
s_modification_time
,
p_box
->
data
.
p_mvhd
->
i_modification_time
);
...
...
modules/demux/mp4/libmp4.h
View file @
a5e1acf9
...
@@ -341,6 +341,7 @@ typedef struct MP4_Box_data_tkhd_s
...
@@ -341,6 +341,7 @@ typedef struct MP4_Box_data_tkhd_s
int32_t
i_matrix
[
9
];
int32_t
i_matrix
[
9
];
int32_t
i_width
;
int32_t
i_width
;
int32_t
i_height
;
int32_t
i_height
;
float
f_rotation
;
}
MP4_Box_data_tkhd_t
;
}
MP4_Box_data_tkhd_t
;
...
...
modules/demux/mp4/mp4.c
View file @
a5e1acf9
...
@@ -105,6 +105,7 @@ typedef struct
...
@@ -105,6 +105,7 @@ typedef struct
/* display size only ! */
/* display size only ! */
int
i_width
;
int
i_width
;
int
i_height
;
int
i_height
;
float
f_rotation
;
/* more internal data */
/* more internal data */
uint64_t
i_timescale
;
/* time scale for this track only */
uint64_t
i_timescale
;
/* time scale for this track only */
...
@@ -1568,6 +1569,20 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -1568,6 +1569,20 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
p_track
,
i_sample_description_index
,
i_chunk
);
p_track
,
i_sample_description_index
,
i_chunk
);
p_demux
->
p_sys
->
f_fps
=
(
float
)
p_track
->
fmt
.
video
.
i_frame_rate
/
p_demux
->
p_sys
->
f_fps
=
(
float
)
p_track
->
fmt
.
video
.
i_frame_rate
/
(
float
)
p_track
->
fmt
.
video
.
i_frame_rate_base
;
(
float
)
p_track
->
fmt
.
video
.
i_frame_rate_base
;
/* Rotation */
switch
(
(
int
)
p_track
->
f_rotation
)
{
case
90
:
p_track
->
fmt
.
video
.
orientation
=
ORIENT_ROTATED_90
;
break
;
case
180
:
p_track
->
fmt
.
video
.
orientation
=
ORIENT_ROTATED_180
;
break
;
case
270
:
p_track
->
fmt
.
video
.
orientation
=
ORIENT_ROTATED_270
;
break
;
}
break
;
break
;
case
AUDIO_ES
:
case
AUDIO_ES
:
...
@@ -2325,6 +2340,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -2325,6 +2340,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
p_track
->
i_track_ID
=
p_tkhd
->
data
.
p_tkhd
->
i_track_ID
;
p_track
->
i_track_ID
=
p_tkhd
->
data
.
p_tkhd
->
i_track_ID
;
p_track
->
i_width
=
p_tkhd
->
data
.
p_tkhd
->
i_width
/
65536
;
p_track
->
i_width
=
p_tkhd
->
data
.
p_tkhd
->
i_width
/
65536
;
p_track
->
i_height
=
p_tkhd
->
data
.
p_tkhd
->
i_height
/
65536
;
p_track
->
i_height
=
p_tkhd
->
data
.
p_tkhd
->
i_height
/
65536
;
p_track
->
f_rotation
=
p_tkhd
->
data
.
p_tkhd
->
f_rotation
;
if
(
p_tref
)
if
(
p_tref
)
{
{
...
...
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