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
ae39fb41
Commit
ae39fb41
authored
Aug 05, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check against a few libass errors in AssHandleYield.
parent
829be5aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
modules/codec/libass.c
modules/codec/libass.c
+21
-7
No files found.
modules/codec/libass.c
View file @
ae39fb41
...
...
@@ -629,13 +629,11 @@ static ass_handle_t *AssHandleYield( decoder_t *p_dec )
{
vlc_mutex_t
*
p_lock
=
var_AcquireMutex
(
"libass"
);
ass_handle_t
*
p_ass
;
ass_library_t
*
p_library
;
ass_renderer_t
*
p_renderer
;
ass_handle_t
*
p_ass
=
NULL
;
ass_library_t
*
p_library
=
NULL
;
ass_renderer_t
*
p_renderer
=
NULL
;
vlc_value_t
val
;
VLC_UNUSED
(
p_dec
);
var_Create
(
p_dec
->
p_libvlc
,
"libass-handle"
,
VLC_VAR_ADDRESS
);
if
(
var_Get
(
p_dec
->
p_libvlc
,
"libass-handle"
,
&
val
)
)
val
.
p_address
=
NULL
;
...
...
@@ -650,10 +648,11 @@ static ass_handle_t *AssHandleYield( decoder_t *p_dec )
return
p_ass
;
}
msg_Err
(
p_dec
,
"--------------------- ALLOC ASS CONTEXt"
);
/* */
p_ass
=
malloc
(
sizeof
(
*
p_ass
)
);
if
(
!
p_ass
)
goto
error
;
/* */
p_ass
->
p_libvlc
=
VLC_OBJECT
(
p_dec
->
p_libvlc
);
p_ass
->
p_lock
=
p_lock
;
...
...
@@ -661,6 +660,8 @@ static ass_handle_t *AssHandleYield( decoder_t *p_dec )
/* Create libass library */
p_ass
->
p_library
=
p_library
=
ass_library_init
();
if
(
!
p_library
)
goto
error
;
ass_set_fonts_dir
(
p_library
,
"/usr/share/fonts"
);
// FIXME
ass_set_extract_fonts
(
p_library
,
true
);
...
...
@@ -668,6 +669,9 @@ static ass_handle_t *AssHandleYield( decoder_t *p_dec )
/* Create the renderer */
p_ass
->
p_renderer
=
p_renderer
=
ass_renderer_init
(
p_library
);
if
(
!
p_renderer
)
goto
error
;
ass_set_use_margins
(
p_renderer
,
false
);
//if( false )
// ass_set_margins( p_renderer, int t, int b, int l, int r);
...
...
@@ -692,6 +696,16 @@ static ass_handle_t *AssHandleYield( decoder_t *p_dec )
/* */
vlc_mutex_unlock
(
p_ass
->
p_lock
);
return
p_ass
;
error:
if
(
p_renderer
)
ass_renderer_done
(
p_renderer
);
if
(
p_library
)
ass_library_done
(
p_library
);
free
(
p_ass
);
vlc_mutex_unlock
(
p_lock
);
return
NULL
;
}
static
void
AssHandleRelease
(
ass_handle_t
*
p_ass
)
{
...
...
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