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
9f84f025
Commit
9f84f025
authored
Mar 12, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavutil callback cannot assume it has a VLC object
This fixes a crash from the avformat (de)mux.
parent
29591e86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
28 deletions
+8
-28
modules/codec/avcodec/avutil.h
modules/codec/avcodec/avutil.h
+8
-28
No files found.
modules/codec/avcodec/avutil.h
View file @
9f84f025
...
@@ -28,12 +28,8 @@
...
@@ -28,12 +28,8 @@
static
inline
void
LibavutilCallback
(
void
*
p_opaque
,
int
i_level
,
static
inline
void
LibavutilCallback
(
void
*
p_opaque
,
int
i_level
,
const
char
*
psz_format
,
va_list
va
)
const
char
*
psz_format
,
va_list
va
)
{
{
int
i_vlc_level
;
AVCodecContext
*
p_avctx
=
(
AVCodecContext
*
)
p_opaque
;
AVCodecContext
*
p_avctx
=
(
AVCodecContext
*
)
p_opaque
;
const
AVClass
*
p_avc
;
const
AVClass
*
p_avc
;
vlc_object_t
*
p_this
;
char
*
psz_new_format
;
const
char
*
psz_item_name
;
p_avc
=
p_avctx
?
p_avctx
->
av_class
:
0
;
p_avc
=
p_avctx
?
p_avctx
->
av_class
:
0
;
...
@@ -48,33 +44,17 @@ static inline void LibavutilCallback( void *p_opaque, int i_level,
...
@@ -48,33 +44,17 @@ static inline void LibavutilCallback( void *p_opaque, int i_level,
}
}
#undef cln
#undef cln
p_this
=
(
vlc_object_t
*
)
p_avctx
->
opaque
;
switch
(
i_level
)
switch
(
i_level
)
{
{
case
AV_LOG_QUIET
:
i_vlc_level
=
VLC_MSG_ERR
;
break
;
case
AV_LOG_ERROR
:
i_vlc_level
=
VLC_MSG_WARN
;
break
;
case
AV_LOG_INFO
:
i_vlc_level
=
VLC_MSG_DBG
;
break
;
case
AV_LOG_DEBUG
:
case
AV_LOG_DEBUG
:
case
AV_LOG_INFO
:
/* Print debug messages if they were requested */
/* Print debug messages if they were requested */
if
(
p_avctx
->
debug
)
vfprintf
(
stderr
,
psz_format
,
va
);
if
(
!
p_avctx
->
debug
)
return
;
break
;
default:
return
;
}
psz_item_name
=
p_avc
->
item_name
(
p_opaque
);
case
AV_LOG_ERROR
:
psz_new_format
=
malloc
(
strlen
(
psz_format
)
+
strlen
(
psz_item_name
)
case
AV_LOG_QUIET
:
+
18
+
5
);
vfprintf
(
stderr
,
psz_format
,
va
);
snprintf
(
psz_new_format
,
strlen
(
psz_format
)
+
strlen
(
psz_item_name
)
break
;
+
18
+
5
,
"%s (%s@%p)"
,
psz_format
,
p_avc
->
item_name
(
p_opaque
),
p_opaque
);
}
msg_GenericVa
(
p_this
,
i_vlc_level
,
MODULE_STRING
,
psz_new_format
,
va
);
free
(
psz_new_format
);
}
}
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