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
0fb61b22
Commit
0fb61b22
authored
Apr 18, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: fix negative height handling
parent
214add2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+9
-11
No files found.
modules/demux/avi/avi.c
View file @
0fb61b22
...
...
@@ -149,6 +149,7 @@ typedef struct
unsigned
int
i_samplesize
;
unsigned
int
i_width_bytes
;
bool
b_flipped
;
es_out_id_t
*
p_es
;
...
...
@@ -515,6 +516,10 @@ static int Open( vlc_object_t * p_this )
default:
break
;
}
tk
->
i_width_bytes
=
p_vids
->
p_bih
->
biWidth
*
(
p_vids
->
p_bih
->
biBitCount
>>
3
);
/* RGB DIB are coded from bottom to top */
if
(
p_vids
->
p_bih
->
biHeight
>=
0
)
tk
->
b_flipped
=
true
;
}
else
{
...
...
@@ -534,10 +539,10 @@ static int Open( vlc_object_t * p_this )
fmt
.
video
.
i_frame_rate
=
tk
->
i_rate
;
fmt
.
video
.
i_frame_rate_base
=
tk
->
i_scale
;
if
(
p_vids
->
p_bih
->
biCompression
==
BI_RAWRGB
)
tk
->
i_width_bytes
=
p_vids
->
p_bih
->
biWidth
*
(
p_vids
->
p_bih
->
biBitCount
>>
3
);
else
tk
->
i_width_bytes
=
0
;
/* Uncompresse Bitmap or YUV, YUV being always topdown */
if
(
fmt
.
video
.
i_height
<
0
)
fmt
.
video
.
i_height
=
(
unsigned
int
)(
-
(
int
)
p_vids
->
p_bih
->
biHeight
)
;
avi_chunk_vprp_t
*
p_vprp
=
AVI_ChunkFind
(
p_strl
,
AVIFOURCC_vprp
,
0
);
if
(
p_vprp
)
...
...
@@ -565,13 +570,6 @@ static int Open( vlc_object_t * p_this )
p_vids
->
p_bih
->
biBitCount
,
(
float
)
tk
->
i_rate
/
(
float
)
tk
->
i_scale
);
if
(
p_vids
->
p_bih
->
biCompression
==
BI_RAWRGB
&&
fmt
.
video
.
i_height
<=
0
)
{
/* RGB DIB are coded from bottom to top */
fmt
.
video
.
i_height
=
(
unsigned
int
)(
-
(
int
)
p_vids
->
p_bih
->
biHeight
);
}
/* Extract palette from extradata if bpp <= 8 */
if
(
fmt
.
video
.
i_bits_per_pixel
>
0
&&
fmt
.
video
.
i_bits_per_pixel
<=
8
)
{
...
...
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