Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
ffmpeg2theora
Commits
5fcf9afa
Commit
5fcf9afa
authored
May 05, 2009
by
Jan Gerber
Browse files
frames off by one, dont write audio after eos page has been written
parent
8fe7ef5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ffmpeg2theora.c
View file @
5fcf9afa
...
...
@@ -1000,7 +1000,7 @@ void ff2theora_output(ff2theora this) {
}
/*check for end time and calculate number of frames to encode*/
no_frames
=
this
->
fps
*
(
this
->
end_time
-
this
->
start_time
);
no_frames
=
this
->
fps
*
(
this
->
end_time
-
this
->
start_time
)
-
1
;
no_samples
=
this
->
sample_rate
*
(
this
->
end_time
-
this
->
start_time
);
if
((
info
.
audio_only
&&
this
->
end_time
>
0
&&
no_samples
<=
0
)
||
(
!
info
.
audio_only
&&
this
->
end_time
>
0
&&
no_frames
<=
0
))
{
...
...
@@ -1189,7 +1189,7 @@ void ff2theora_output(ff2theora this) {
if
((
audio_eos
&&
!
audio_done
)
||
(
ret
>=
0
&&
pkt
.
stream_index
==
this
->
audio_index
))
{
this
->
pts_offset
=
(
double
)
pkt
.
pts
/
AV_TIME_BASE
-
(
double
)
this
->
sample_count
/
this
->
sample_rate
;
while
(
audio_eos
||
len
>
0
)
{
while
(
(
audio_eos
&&
!
audio_done
)
||
len
>
0
)
{
int
samples
=
0
;
int
samples_out
=
0
;
int
data_size
=
4
*
AVCODEC_MAX_AUDIO_FRAME_SIZE
;
...
...
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