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
9c537633
Commit
9c537633
authored
Aug 05, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle libass track creation errors.
parent
64a820eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
modules/codec/libass.c
modules/codec/libass.c
+14
-3
No files found.
modules/codec/libass.c
View file @
9c537633
...
...
@@ -140,11 +140,15 @@ static int Create( vlc_object_t *p_this )
return
VLC_ENOMEM
;
/* */
p_sys
->
p_ass
=
AssHandleYield
(
p_dec
);
if
(
!
p_sys
->
p_ass
)
{
free
(
p_sys
);
return
VLC_EGENERIC
;
}
vlc_mutex_init
(
&
p_sys
->
lock
);
p_sys
->
i_refcount
=
1
;
p_sys
->
p_ass
=
AssHandleYield
(
p_dec
);
/* load attachments */
input_attachment_t
**
pp_attachments
;
int
i_attachments
;
...
...
@@ -173,6 +177,12 @@ static int Create( vlc_object_t *p_this )
/* Add a track */
vlc_mutex_lock
(
p_sys
->
p_ass
->
p_lock
);
p_sys
->
p_track
=
p_track
=
ass_new_track
(
p_sys
->
p_ass
->
p_library
);
if
(
!
p_track
)
{
vlc_mutex_unlock
(
p_sys
->
p_ass
->
p_lock
);
DecSysRelease
(
p_sys
);
return
VLC_EGENERIC
;
}
ass_process_codec_private
(
p_track
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
);
vlc_mutex_unlock
(
p_sys
->
p_ass
->
p_lock
);
...
...
@@ -209,7 +219,8 @@ static void DecSysRelease( decoder_sys_t *p_sys )
vlc_mutex_destroy
(
&
p_sys
->
lock
);
vlc_mutex_lock
(
p_sys
->
p_ass
->
p_lock
);
ass_free_track
(
p_sys
->
p_track
);
if
(
p_sys
->
p_track
)
ass_free_track
(
p_sys
->
p_track
);
vlc_mutex_unlock
(
p_sys
->
p_ass
->
p_lock
);
AssHandleRelease
(
p_sys
->
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