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
3b0c2208
Commit
3b0c2208
authored
May 05, 2013
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: check if we need to padd last frame
Should Fix #8539
parent
3ae38645
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+9
-0
No files found.
modules/codec/avcodec/encoder.c
View file @
3b0c2208
...
@@ -1148,6 +1148,15 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
...
@@ -1148,6 +1148,15 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
p_aout_buf
->
i_buffer
-=
leftover
;
p_aout_buf
->
i_buffer
-=
leftover
;
p_aout_buf
->
i_pts
=
date_Get
(
&
p_sys
->
buffer_date
);
p_aout_buf
->
i_pts
=
date_Get
(
&
p_sys
->
buffer_date
);
}
}
if
(
unlikely
(
(
(
leftover
+
buffer_delay
)
<
p_sys
->
i_buffer_out
)
&&
!
(
p_sys
->
p_codec
->
capabilities
&
CODEC_CAP_SMALL_LAST_FRAME
))
)
{
msg_Dbg
(
p_enc
,
"No small last frame support, padding"
);
size_t
padding_size
=
p_sys
->
i_buffer_out
-
(
leftover
+
buffer_delay
);
memset
(
p_sys
->
p_buffer
+
(
leftover
+
buffer_delay
),
0
,
padding_size
);
buffer_delay
+=
padding_size
;
}
if
(
avcodec_fill_audio_frame
(
p_sys
->
frame
,
p_enc
->
fmt_in
.
audio
.
i_channels
,
if
(
avcodec_fill_audio_frame
(
p_sys
->
frame
,
p_enc
->
fmt_in
.
audio
.
i_channels
,
p_sys
->
p_context
->
sample_fmt
,
p_sys
->
p_buffer
,
p_sys
->
p_context
->
sample_fmt
,
p_sys
->
p_buffer
,
leftover
+
buffer_delay
,
leftover
+
buffer_delay
,
...
...
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