Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
dcc1d93d
Commit
dcc1d93d
authored
Feb 21, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed theora encoder.
parent
fdd6eed1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
modules/codec/theora.c
modules/codec/theora.c
+15
-18
No files found.
modules/codec/theora.c
View file @
dcc1d93d
...
@@ -550,9 +550,7 @@ static int OpenEncoder( vlc_object_t *p_this )
...
@@ -550,9 +550,7 @@ static int OpenEncoder( vlc_object_t *p_this )
{
{
encoder_t
*
p_enc
=
(
encoder_t
*
)
p_this
;
encoder_t
*
p_enc
=
(
encoder_t
*
)
p_this
;
encoder_sys_t
*
p_sys
;
encoder_sys_t
*
p_sys
;
ogg_packet
header
;
int
i_quality
;
uint8_t
*
p_extra
;
int
i_quality
,
i
;
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_THEORA
&&
if
(
p_enc
->
fmt_out
.
i_codec
!=
VLC_CODEC_THEORA
&&
!
p_enc
->
b_force
)
!
p_enc
->
b_force
)
...
@@ -644,25 +642,24 @@ static int OpenEncoder( vlc_object_t *p_this )
...
@@ -644,25 +642,24 @@ static int OpenEncoder( vlc_object_t *p_this )
theora_comment_init
(
&
p_sys
->
tc
);
theora_comment_init
(
&
p_sys
->
tc
);
/* Create and store headers */
/* Create and store headers */
p_enc
->
fmt_out
.
i_extra
=
3
*
2
;
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
i
=
0
;
i
<
3
;
i
++
)
{
{
if
(
i
==
0
)
theora_encode_header
(
&
p_sys
->
td
,
&
header
);
ogg_packet
header
;
else
if
(
i
==
1
)
theora_encode_comment
(
&
p_sys
->
tc
,
&
header
);
else
if
(
i
==
2
)
theora_encode_tables
(
&
p_sys
->
td
,
&
header
);
p_enc
->
fmt_out
.
p_extra
=
xrealloc
(
p_enc
->
fmt_out
.
p_extra
,
if
(
i
==
0
)
p_enc
->
fmt_out
.
i_extra
+
header
.
bytes
);
theora_encode_header
(
&
p_sys
->
td
,
&
header
);
p_extra
=
p_enc
->
fmt_out
.
p_extra
;
else
if
(
i
==
1
)
p_extra
+=
p_enc
->
fmt_out
.
i_extra
+
(
i
-
3
)
*
2
;
theora_encode_comment
(
&
p_sys
->
tc
,
&
header
);
p_enc
->
fmt_out
.
i_extra
+=
header
.
bytes
;
else
theora_encode_tables
(
&
p_sys
->
td
,
&
header
);
*
(
p_extra
++
)
=
header
.
bytes
>>
8
;
if
(
xiph_AppendHeaders
(
&
p_enc
->
fmt_out
.
i_extra
,
&
p_enc
->
fmt_out
.
p_extra
,
*
(
p_extra
++
)
=
header
.
bytes
&
0xFF
;
header
.
bytes
,
header
.
packet
)
)
{
memcpy
(
p_extra
,
header
.
packet
,
header
.
bytes
);
p_enc
->
fmt_out
.
i_extra
=
0
;
p_enc
->
fmt_out
.
p_extra
=
NULL
;
}
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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