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
aec33d68
Commit
aec33d68
authored
Feb 17, 2014
by
Matthias Keiser
Committed by
Jean-Baptiste Kempf
Feb 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avformat: Support rotation information
Notably for mp4 Ref #2882
parent
5abfaffa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+22
-0
No files found.
modules/demux/avformat/demux.c
View file @
aec33d68
...
...
@@ -335,6 +335,28 @@ int OpenDemux( vlc_object_t *p_this )
fmt
.
video
.
i_width
=
cc
->
width
;
fmt
.
video
.
i_height
=
cc
->
height
;
char
const
*
kRotateKey
=
"rotate"
;
AVDictionaryEntry
*
rotation
=
av_dict_get
(
s
->
metadata
,
kRotateKey
,
NULL
,
0
);
if
(
rotation
)
{
long
angle
=
strtol
(
rotation
->
value
,
NULL
,
10
);
if
(
angle
>
45
&&
angle
<
135
)
fmt
.
video
.
orientation
=
ORIENT_ROTATED_270
;
else
if
(
angle
>
135
&&
angle
<
225
)
fmt
.
video
.
orientation
=
ORIENT_ROTATED_180
;
else
if
(
angle
>
225
&&
angle
<
315
)
fmt
.
video
.
orientation
=
ORIENT_ROTATED_90
;
else
fmt
.
video
.
orientation
=
ORIENT_NORMAL
;
}
#if LIBAVCODEC_VERSION_MAJOR < 54
if
(
cc
->
palctrl
)
{
...
...
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