Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
dbad0d27
Commit
dbad0d27
authored
Sep 01, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: fix compilation (fixes #15393)
(This is not tested.)
parent
3d2850fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+7
-5
No files found.
modules/codec/avcodec/encoder.c
View file @
dbad0d27
...
...
@@ -1003,7 +1003,7 @@ errmsg:
}
}
p_sys
->
frame
=
av
codec_alloc_frame
();
p_sys
->
frame
=
av
_frame_alloc
();
if
(
!
p_sys
->
frame
)
{
goto
error
;
...
...
@@ -1073,7 +1073,8 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
AVFrame
*
frame
=
NULL
;
if
(
likely
(
p_pict
)
)
{
frame
=
p_sys
->
frame
;
avcodec_get_frame_defaults
(
frame
);
av_frame_unref
(
frame
);
for
(
i_plane
=
0
;
i_plane
<
p_pict
->
i_planes
;
i_plane
++
)
{
p_sys
->
frame
->
data
[
i_plane
]
=
p_pict
->
p
[
i_plane
].
p_pixels
;
...
...
@@ -1236,7 +1237,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int
//How much we need to copy from new packet
const
int
leftover
=
leftover_samples
*
p_sys
->
p_context
->
channels
*
p_sys
->
i_sample_bytes
;
av
codec_get_frame_defaults
(
p_sys
->
frame
);
av
_frame_unref
(
p_sys
->
frame
);
p_sys
->
frame
->
format
=
p_sys
->
p_context
->
sample_fmt
;
p_sys
->
frame
->
nb_samples
=
leftover_samples
+
p_sys
->
i_samples_delay
;
...
...
@@ -1358,7 +1359,8 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
while
(
(
p_aout_buf
->
i_nb_samples
>=
p_sys
->
i_frame_size
)
||
(
p_sys
->
b_variable
&&
p_aout_buf
->
i_nb_samples
)
)
{
avcodec_get_frame_defaults
(
p_sys
->
frame
);
av_frame_unref
(
p_sys
->
frame
);
if
(
p_sys
->
b_variable
)
p_sys
->
frame
->
nb_samples
=
p_aout_buf
->
i_nb_samples
;
else
...
...
@@ -1421,7 +1423,7 @@ void CloseEncoder( vlc_object_t *p_this )
encoder_t
*
p_enc
=
(
encoder_t
*
)
p_this
;
encoder_sys_t
*
p_sys
=
p_enc
->
p_sys
;
av
codec_free_fram
e
(
&
p_sys
->
frame
);
av
_frame_fre
e
(
&
p_sys
->
frame
);
vlc_avcodec_lock
();
avcodec_close
(
p_sys
->
p_context
);
...
...
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