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
1be112b6
Commit
1be112b6
authored
Feb 28, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix FfmpegExecute callback prototype
parent
862258e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+7
-6
No files found.
modules/codec/avcodec/encoder.c
View file @
1be112b6
...
@@ -70,7 +70,7 @@ struct thread_context_t;
...
@@ -70,7 +70,7 @@ struct thread_context_t;
static
void
*
FfmpegThread
(
vlc_object_t
*
p_this
);
static
void
*
FfmpegThread
(
vlc_object_t
*
p_this
);
static
int
FfmpegExecute
(
AVCodecContext
*
s
,
static
int
FfmpegExecute
(
AVCodecContext
*
s
,
int
(
*
pf_func
)(
AVCodecContext
*
c2
,
void
*
arg2
),
int
(
*
pf_func
)(
AVCodecContext
*
c2
,
void
*
arg2
),
void
*
*
arg
,
int
*
ret
,
int
cou
nt
);
void
*
arg
,
int
*
ret
,
int
count
,
i
nt
);
/*****************************************************************************
/*****************************************************************************
* thread_context_t : for multithreaded encoding
* thread_context_t : for multithreaded encoding
...
@@ -751,25 +751,25 @@ static void* FfmpegThread( vlc_object_t *p_this )
...
@@ -751,25 +751,25 @@ static void* FfmpegThread( vlc_object_t *p_this )
static
int
FfmpegExecute
(
AVCodecContext
*
s
,
static
int
FfmpegExecute
(
AVCodecContext
*
s
,
int
(
*
pf_func
)(
AVCodecContext
*
c2
,
void
*
arg2
),
int
(
*
pf_func
)(
AVCodecContext
*
c2
,
void
*
arg2
),
void
*
*
arg
,
int
*
ret
,
int
count
)
void
*
arg
,
int
*
ret
,
int
count
,
int
size
)
{
{
struct
thread_context_t
**
pp_contexts
=
struct
thread_context_t
**
pp_contexts
=
(
struct
thread_context_t
**
)
s
->
thread_opaque
;
(
struct
thread_context_t
**
)
s
->
thread_opaque
;
int
i
;
void
**
argv
=
arg
;
/* Note, we can be certain that this is not called with the same
/* Note, we can be certain that this is not called with the same
* AVCodecContext by different threads at the same time */
* AVCodecContext by different threads at the same time */
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
count
;
i
++
)
{
{
vlc_mutex_lock
(
&
pp_contexts
[
i
]
->
lock
);
vlc_mutex_lock
(
&
pp_contexts
[
i
]
->
lock
);
pp_contexts
[
i
]
->
arg
=
arg
[
i
];
pp_contexts
[
i
]
->
arg
=
arg
v
[
i
];
pp_contexts
[
i
]
->
pf_func
=
pf_func
;
pp_contexts
[
i
]
->
pf_func
=
pf_func
;
pp_contexts
[
i
]
->
i_ret
=
12345
;
pp_contexts
[
i
]
->
i_ret
=
12345
;
pp_contexts
[
i
]
->
b_work
=
1
;
pp_contexts
[
i
]
->
b_work
=
1
;
vlc_cond_signal
(
&
pp_contexts
[
i
]
->
cond
);
vlc_cond_signal
(
&
pp_contexts
[
i
]
->
cond
);
vlc_mutex_unlock
(
&
pp_contexts
[
i
]
->
lock
);
vlc_mutex_unlock
(
&
pp_contexts
[
i
]
->
lock
);
}
}
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
count
;
i
++
)
{
{
vlc_mutex_lock
(
&
pp_contexts
[
i
]
->
lock
);
vlc_mutex_lock
(
&
pp_contexts
[
i
]
->
lock
);
while
(
!
pp_contexts
[
i
]
->
b_done
)
while
(
!
pp_contexts
[
i
]
->
b_done
)
...
@@ -786,6 +786,7 @@ static int FfmpegExecute( AVCodecContext *s,
...
@@ -786,6 +786,7 @@ static int FfmpegExecute( AVCodecContext *s,
}
}
}
}
(
void
)
size
;
return
0
;
return
0
;
}
}
...
...
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