Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
c24a40ba
Commit
c24a40ba
authored
Oct 06, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: always initialize video.i_visible_width/height
parent
f7f1c524
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
2 deletions
+32
-2
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+2
-0
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+2
-0
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+4
-0
modules/demux/cdg.c
modules/demux/cdg.c
+2
-0
modules/demux/mkv/matroska_segment_parse.cpp
modules/demux/mkv/matroska_segment_parse.cpp
+2
-2
modules/demux/mpeg/ts.c
modules/demux/mpeg/ts.c
+2
-0
modules/demux/nsv.c
modules/demux/nsv.c
+2
-0
modules/demux/nuv.c
modules/demux/nuv.c
+2
-0
modules/demux/ogg.c
modules/demux/ogg.c
+10
-0
modules/demux/rawdv.c
modules/demux/rawdv.c
+2
-0
modules/demux/real.c
modules/demux/real.c
+2
-0
No files found.
modules/demux/asf/asf.c
View file @
c24a40ba
...
...
@@ -933,6 +933,8 @@ static int DemuxInit( demux_t *p_demux )
UINT_MAX
,
uint32_t
);
GET_CHECKED
(
fmt
.
video
.
i_height
,
GetDWLE
(
p_data
+
8
),
UINT_MAX
,
uint32_t
);
fmt
.
video
.
i_visible_width
=
fmt
.
video
.
i_width
;
fmt
.
video
.
i_visible_height
=
fmt
.
video
.
i_height
;
if
(
p_esp
&&
p_esp
->
i_average_time_per_frame
>
0
)
{
...
...
modules/demux/avformat/demux.c
View file @
c24a40ba
...
...
@@ -403,6 +403,8 @@ int OpenDemux( vlc_object_t *p_this )
fmt
.
video
.
i_width
=
cc
->
width
;
fmt
.
video
.
i_height
=
cc
->
height
;
fmt
.
video
.
i_visible_width
=
fmt
.
video
.
i_width
;
fmt
.
video
.
i_visible_height
=
fmt
.
video
.
i_height
;
get_rotation
(
&
fmt
,
s
);
...
...
modules/demux/avi/avi.c
View file @
c24a40ba
...
...
@@ -590,6 +590,8 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_width
=
p_vids
->
p_bih
->
biWidth
;
fmt
.
video
.
i_height
=
p_vids
->
p_bih
->
biHeight
;
fmt
.
video
.
i_visible_width
=
fmt
.
video
.
i_width
;
fmt
.
video
.
i_visible_height
=
fmt
.
video
.
i_height
;
fmt
.
video
.
i_bits_per_pixel
=
p_vids
->
p_bih
->
biBitCount
;
fmt
.
video
.
i_frame_rate
=
tk
->
i_rate
;
fmt
.
video
.
i_frame_rate_base
=
tk
->
i_scale
;
...
...
@@ -668,6 +670,8 @@ static int Open( vlc_object_t * p_this )
es_format_Init
(
&
fmt
,
VIDEO_ES
,
p_strh
->
i_handler
);
fmt
.
video
.
i_width
=
p_avih
->
i_width
;
fmt
.
video
.
i_height
=
p_avih
->
i_height
;
fmt
.
video
.
i_visible_width
=
fmt
.
video
.
i_width
;
fmt
.
video
.
i_visible_height
=
fmt
.
video
.
i_height
;
break
;
case
(
AVIFOURCC_mids
):
...
...
modules/demux/cdg.c
View file @
c24a40ba
...
...
@@ -98,6 +98,8 @@ static int Open( vlc_object_t * p_this )
es_format_Init
(
&
p_sys
->
fmt
,
VIDEO_ES
,
VLC_CODEC_CDG
);
p_sys
->
fmt
.
video
.
i_width
=
300
-
2
*
6
;
p_sys
->
fmt
.
video
.
i_height
=
216
-
2
*
12
;
p_sys
->
fmt
.
video
.
i_visible_width
=
p_sys
->
fmt
.
video
.
i_width
;
p_sys
->
fmt
.
video
.
i_visible_height
=
p_sys
->
fmt
.
video
.
i_height
;
p_sys
->
p_es
=
es_out_Add
(
p_demux
->
out
,
&
p_sys
->
fmt
);
...
...
modules/demux/mkv/matroska_segment_parse.cpp
View file @
c24a40ba
...
...
@@ -645,10 +645,10 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
tk
->
fmt
.
video
.
i_sar_num
=
i_display_width
*
tk
->
fmt
.
video
.
i_height
;
tk
->
fmt
.
video
.
i_sar_den
=
i_display_height
*
tk
->
fmt
.
video
.
i_width
;
}
tk
->
fmt
.
video
.
i_visible_width
=
tk
->
fmt
.
video
.
i_width
;
tk
->
fmt
.
video
.
i_visible_height
=
tk
->
fmt
.
video
.
i_height
;
if
(
i_crop_left
||
i_crop_right
||
i_crop_top
||
i_crop_bottom
)
{
tk
->
fmt
.
video
.
i_visible_width
=
tk
->
fmt
.
video
.
i_width
;
tk
->
fmt
.
video
.
i_visible_height
=
tk
->
fmt
.
video
.
i_height
;
tk
->
fmt
.
video
.
i_x_offset
=
i_crop_left
;
tk
->
fmt
.
video
.
i_y_offset
=
i_crop_top
;
tk
->
fmt
.
video
.
i_visible_width
-=
i_crop_left
+
i_crop_right
;
...
...
modules/demux/mpeg/ts.c
View file @
c24a40ba
...
...
@@ -4739,6 +4739,8 @@ static void PMTSetupEs0xA0( demux_t *p_demux, ts_pes_es_t *p_es,
p_dr
->
p_data
[
2
],
p_dr
->
p_data
[
3
]
);
p_fmt
->
video
.
i_width
=
GetWBE
(
&
p_dr
->
p_data
[
4
]
);
p_fmt
->
video
.
i_height
=
GetWBE
(
&
p_dr
->
p_data
[
6
]
);
p_fmt
->
video
.
i_visible_width
=
p_fmt
->
video
.
i_width
;
p_fmt
->
video
.
i_visible_height
=
p_fmt
->
video
.
i_height
;
p_fmt
->
i_extra
=
GetWBE
(
&
p_dr
->
p_data
[
8
]
);
if
(
p_fmt
->
i_extra
>
0
)
...
...
modules/demux/nsv.c
View file @
c24a40ba
...
...
@@ -503,6 +503,8 @@ static int ReadNSVs( demux_t *p_demux )
es_format_Init
(
&
p_sys
->
fmt_video
,
VIDEO_ES
,
fcc
);
p_sys
->
fmt_video
.
video
.
i_width
=
GetWLE
(
&
header
[
12
]
);
p_sys
->
fmt_video
.
video
.
i_height
=
GetWLE
(
&
header
[
14
]
);
p_sys
->
fmt_video
.
video
.
i_visible_width
=
p_sys
->
fmt_video
.
video
.
i_width
;
p_sys
->
fmt_video
.
video
.
i_visible_height
=
p_sys
->
fmt_video
.
video
.
i_height
;
if
(
p_sys
->
p_video
)
{
es_out_Del
(
p_demux
->
out
,
p_sys
->
p_video
);
...
...
modules/demux/nuv.c
View file @
c24a40ba
...
...
@@ -301,6 +301,8 @@ static int Open( vlc_object_t * p_this )
es_format_Init
(
&
fmt
,
VIDEO_ES
,
p_sys
->
exh
.
i_video_fcc
);
fmt
.
video
.
i_width
=
p_sys
->
hdr
.
i_width
;
fmt
.
video
.
i_height
=
p_sys
->
hdr
.
i_height
;
fmt
.
video
.
i_visible_width
=
fmt
.
video
.
i_width
;
fmt
.
video
.
i_visible_height
=
fmt
.
video
.
i_height
;
fmt
.
i_extra
=
p_sys
->
i_extra_f
;
fmt
.
p_extra
=
p_sys
->
p_extra_f
;
fmt
.
video
.
i_sar_num
=
p_sys
->
hdr
.
d_aspect
*
fmt
.
video
.
i_height
;
...
...
modules/demux/ogg.c
View file @
c24a40ba
...
...
@@ -1768,6 +1768,10 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
GetDWLE
((
oggpacket
.
packet
+
176
));
p_stream
->
fmt
.
video
.
i_height
=
GetDWLE
((
oggpacket
.
packet
+
180
));
p_stream
->
fmt
.
video
.
i_visible_width
=
p_stream
->
fmt
.
video
.
i_width
;
p_stream
->
fmt
.
video
.
i_visible_height
=
p_stream
->
fmt
.
video
.
i_height
;
msg_Dbg
(
p_demux
,
"fps: %f, width:%i; height:%i, bitcount:%i"
,
...
...
@@ -1890,6 +1894,10 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
p_stream
->
fmt
.
video
.
i_bits_per_pixel
=
st
->
bits_per_sample
;
p_stream
->
fmt
.
video
.
i_width
=
st
->
sh
.
video
.
width
;
p_stream
->
fmt
.
video
.
i_height
=
st
->
sh
.
video
.
height
;
p_stream
->
fmt
.
video
.
i_visible_width
=
p_stream
->
fmt
.
video
.
i_width
;
p_stream
->
fmt
.
video
.
i_visible_height
=
p_stream
->
fmt
.
video
.
i_height
;
msg_Dbg
(
p_demux
,
"fps: %f, width:%i; height:%i, bitcount:%i"
,
...
...
@@ -2848,6 +2856,8 @@ static bool Ogg_ReadVP8Header( demux_t *p_demux, logical_stream_t *p_stream,
p_stream
->
i_granule_shift
=
32
;
p_stream
->
fmt
.
video
.
i_width
=
GetWBE
(
&
p_oggpacket
->
packet
[
8
]
);
p_stream
->
fmt
.
video
.
i_height
=
GetWBE
(
&
p_oggpacket
->
packet
[
10
]
);
p_stream
->
fmt
.
video
.
i_visible_width
=
p_stream
->
fmt
.
video
.
i_width
;
p_stream
->
fmt
.
video
.
i_visible_height
=
p_stream
->
fmt
.
video
.
i_height
;
p_stream
->
fmt
.
video
.
i_sar_num
=
GetDWBE
(
&
p_oggpacket
->
packet
[
12
-
1
]
)
&
0x0FFF
;
p_stream
->
fmt
.
video
.
i_sar_den
=
GetDWBE
(
&
p_oggpacket
->
packet
[
15
-
1
]
)
&
0x0FFF
;
p_stream
->
fmt
.
video
.
i_frame_rate
=
GetDWBE
(
&
p_oggpacket
->
packet
[
18
]
);
...
...
modules/demux/rawdv.c
View file @
c24a40ba
...
...
@@ -215,6 +215,8 @@ static int Open( vlc_object_t * p_this )
es_format_Init
(
&
p_sys
->
fmt_video
,
VIDEO_ES
,
VLC_CODEC_DV
);
p_sys
->
fmt_video
.
video
.
i_width
=
720
;
p_sys
->
fmt_video
.
video
.
i_height
=
dv_header
.
dsf
?
576
:
480
;;
p_sys
->
fmt_video
.
video
.
i_visible_width
=
p_sys
->
fmt_video
.
video
.
i_width
;
p_sys
->
fmt_video
.
video
.
i_visible_height
=
p_sys
->
fmt_video
.
video
.
i_height
;
p_sys
->
p_es_video
=
es_out_Add
(
p_demux
->
out
,
&
p_sys
->
fmt_video
);
...
...
modules/demux/real.c
View file @
c24a40ba
...
...
@@ -1375,6 +1375,8 @@ static int CodecVideoParse( demux_t *p_demux, int i_tk_id, const uint8_t *p_data
VLC_FOURCC
(
p_data
[
8
],
p_data
[
9
],
p_data
[
10
],
p_data
[
11
]
)
);
fmt
.
video
.
i_width
=
GetWBE
(
&
p_data
[
12
]
);
fmt
.
video
.
i_height
=
GetWBE
(
&
p_data
[
14
]
);
fmt
.
video
.
i_visible_width
=
fmt
.
video
.
i_width
;
fmt
.
video
.
i_visible_height
=
fmt
.
video
.
i_height
;
fmt
.
video
.
i_frame_rate
=
(
GetWBE
(
&
p_data
[
22
]
)
<<
16
)
|
GetWBE
(
&
p_data
[
24
]
);
fmt
.
video
.
i_frame_rate_base
=
1
<<
16
;
...
...
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