summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-06-25 21:17:05 +0200
committerStefano Sabatini <stefasab@gmail.com>2013-06-26 23:38:42 +0200
commit80b56a7bdd0f541d9c9f029bd01e57fb6b352e33 (patch)
treeedbbad19982cb94669bc4e01e1da4efd3e3a9fbe /doc
parentdb7ebab5c360f695165b732c475544a6244a132b (diff)
examples/muxing: rename audio/video_pts to audio/video_time
The new name is less confusing, since the variables represent times rather than timestamps.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/muxing.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index d1a290eae4..a8a0edacbe 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -387,7 +387,7 @@ int main(int argc, char **argv)
AVFormatContext *oc;
AVStream *audio_st, *video_st;
AVCodec *audio_codec, *video_codec;
- double audio_pts, video_pts;
+ double audio_time, video_time;
int ret;
/* Initialize libavcodec, and register all codecs and formats. */
@@ -461,21 +461,21 @@ int main(int argc, char **argv)
for (;;) {
/* Compute current audio and video time. */
if (audio_st)
- audio_pts = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
+ audio_time = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
else
- audio_pts = 0.0;
+ audio_time = 0.0;
if (video_st)
- video_pts = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
+ video_time = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
else
- video_pts = 0.0;
+ video_time = 0.0;
- if ((!audio_st || audio_pts >= STREAM_DURATION) &&
- (!video_st || video_pts >= STREAM_DURATION))
+ if ((!audio_st || audio_time >= STREAM_DURATION) &&
+ (!video_st || video_time >= STREAM_DURATION))
break;
/* write interleaved audio and video frames */
- if (!video_st || (video_st && audio_st && audio_pts < video_pts)) {
+ if (!video_st || (video_st && audio_st && audio_time < video_time)) {
write_audio_frame(oc, audio_st);
} else {
write_video_frame(oc, video_st);