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
93a85bdb
Commit
93a85bdb
authored
May 24, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used dvdnav_get_video_resolution to fix the AR of some dvd menus.
parent
4f36a3e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
configure.ac
configure.ac
+3
-0
modules/access/dvdnav.c
modules/access/dvdnav.c
+32
-0
No files found.
configure.ac
View file @
93a85bdb
...
...
@@ -1932,6 +1932,9 @@ then
VLC_ADD_PLUGIN([dvdnav])
VLC_ADD_CFLAGS([dvdnav],[`${DVDNAV_CONFIG} --cflags`])
VLC_ADD_LIBS([dvdnav],[`${DVDNAV_CONFIG} --libs`])
AC_CHECK_LIB(dvdnav, dvdnav_get_video_resolution,
AC_DEFINE(HAVE_DVDNAV_GET_VIDEO_RESOLUTION, 1, [Define if you have dvdnav_get_video_resolution.]),
[], [${LIBS_dvdnav}])
fi
fi
...
...
modules/access/dvdnav.c
View file @
93a85bdb
...
...
@@ -138,6 +138,12 @@ struct demux_sys_t
uint8_t
palette
[
4
][
4
];
bool
b_spu_change
;
/* Aspect ration */
struct
{
unsigned
i_num
;
unsigned
i_den
;
}
sar
;
/* */
int
i_title
;
input_title_t
**
title
;
...
...
@@ -231,6 +237,8 @@ static int Open( vlc_object_t *p_this )
p_sys
->
b_reset_pcr
=
false
;
ps_track_init
(
p_sys
->
tk
);
p_sys
->
sar
.
i_num
=
0
;
p_sys
->
sar
.
i_den
=
0
;
p_sys
->
i_mux_rate
=
0
;
p_sys
->
i_pgc_length
=
0
;
p_sys
->
b_spu_change
=
false
;
...
...
@@ -744,6 +752,28 @@ static int Demux( demux_t *p_demux )
tk
->
b_seen
=
false
;
}
#if defined(HAVE_DVDNAV_GET_VIDEO_RESOLUTION)
uint32_t
i_width
,
i_height
;
if
(
dvdnav_get_video_resolution
(
p_sys
->
dvdnav
,
&
i_width
,
&
i_height
)
)
i_width
=
i_height
=
0
;
switch
(
dvdnav_get_video_aspect
(
p_sys
->
dvdnav
)
)
{
case
0
:
p_sys
->
sar
.
i_num
=
4
*
i_height
;
p_sys
->
sar
.
i_den
=
3
*
i_width
;
break
;
case
3
:
p_sys
->
sar
.
i_num
=
16
*
i_height
;
p_sys
->
sar
.
i_den
=
9
*
i_width
;
break
;
default:
p_sys
->
sar
.
i_num
=
0
;
p_sys
->
sar
.
i_den
=
0
;
break
;
}
#endif
if
(
dvdnav_current_title_info
(
p_sys
->
dvdnav
,
&
i_title
,
&
i_part
)
==
DVDNAV_STATUS_OK
)
{
...
...
@@ -1217,6 +1247,8 @@ static void ESNew( demux_t *p_demux, int i_id )
/* Add a new ES */
if
(
tk
->
fmt
.
i_cat
==
VIDEO_ES
)
{
tk
->
fmt
.
video
.
i_sar_num
=
p_sys
->
sar
.
i_num
;
tk
->
fmt
.
video
.
i_sar_den
=
p_sys
->
sar
.
i_den
;
b_select
=
true
;
}
else
if
(
tk
->
fmt
.
i_cat
==
AUDIO_ES
)
...
...
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