summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-09-27 11:41:38 +0200
committerPaul B Mahol <onemda@gmail.com>2019-09-29 20:41:29 +0200
commit4a51075f4db17ce5a6fcad7548bb5cf60511d3f0 (patch)
treed0bc02aec63f5409bf8c7f586bcd18a997ded759 /doc/examples
parent1929dd4eff93e81bab8637f298754294448e624e (diff)
doc/examples/muxing: fix underflow in duration of encoded streams
Now they are exactly 10 seconds long. Fixes #5684.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/muxing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 08da98e574..9af9aae483 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -285,7 +285,7 @@ static AVFrame *get_audio_frame(OutputStream *ost)
/* check if we want to generate more frames */
if (av_compare_ts(ost->next_pts, ost->enc->time_base,
- STREAM_DURATION, (AVRational){ 1, 1 }) >= 0)
+ STREAM_DURATION, (AVRational){ 1, 1 }) > 0)
return NULL;
for (j = 0; j <frame->nb_samples; j++) {
@@ -464,7 +464,7 @@ static AVFrame *get_video_frame(OutputStream *ost)
/* check if we want to generate more frames */
if (av_compare_ts(ost->next_pts, c->time_base,
- STREAM_DURATION, (AVRational){ 1, 1 }) >= 0)
+ STREAM_DURATION, (AVRational){ 1, 1 }) > 0)
return NULL;
/* when we pass a frame to the encoder, it may keep a reference to it