Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
41cab40d
Commit
41cab40d
authored
Aug 15, 2005
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also allow an empty palette marked with palette.i_entries = 0
parent
39cc95b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+16
-7
No files found.
modules/codec/dvbsub.c
View file @
41cab40d
...
@@ -1795,14 +1795,20 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
...
@@ -1795,14 +1795,20 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
if
(
p_region
->
fmt
.
i_chroma
!=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
)
&&
if
(
p_region
->
fmt
.
i_chroma
!=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
)
&&
p_region
->
fmt
.
i_chroma
!=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
)
return
NULL
;
p_region
->
fmt
.
i_chroma
!=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
)
return
NULL
;
if
(
p_region
->
fmt
.
p_palette
&&
if
(
p_region
->
fmt
.
p_palette
)
(
p_region
->
fmt
.
p_palette
->
i_entries
!=
4
)
&&
(
p_region
->
fmt
.
p_palette
->
i_entries
!=
16
)
&&
(
p_region
->
fmt
.
p_palette
->
i_entries
!=
256
)
)
{
{
msg_Err
(
p_enc
,
"subpicture palette (%d) not handled"
,
switch
(
p_region
->
fmt
.
p_palette
->
i_entries
)
p_region
->
fmt
.
p_palette
->
i_entries
);
{
return
NULL
;
case
0
:
case
4
:
case
16
:
case
256
:
break
;
default:
msg_Err
(
p_enc
,
"subpicture palette (%d) not handled"
,
p_region
->
fmt
.
p_palette
->
i_entries
);
return
NULL
;
}
}
}
/* End of hack */
/* End of hack */
...
@@ -2187,6 +2193,9 @@ static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
...
@@ -2187,6 +2193,9 @@ static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
{
{
switch
(
p_region
->
fmt
.
p_palette
->
i_entries
)
switch
(
p_region
->
fmt
.
p_palette
->
i_entries
)
{
{
case
0
:
break
;
case
4
:
case
4
:
bs_write
(
s
,
8
,
0x10
);
/* 2 bit/pixel code string */
bs_write
(
s
,
8
,
0x10
);
/* 2 bit/pixel code string */
encode_pixel_line_2bp
(
p_enc
,
s
,
p_region
,
i_line
);
encode_pixel_line_2bp
(
p_enc
,
s
,
p_region
,
i_line
);
...
...
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