diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-24 21:01:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-24 21:33:59 +0200 |
commit | 511398031cc9991a0f4eb9dcaca5b7d9ca9c636d (patch) | |
tree | 2654d06bb5eca1ab792ec34d7277b56a9bc7f671 /libavdevice | |
parent | c2c4cee866926cb95b2b1a4b28fff9caa4177c7e (diff) | |
parent | 424b929b5cb9ca4094099f25179829260d4b0fa3 (diff) | |
download | ffmpeg-511398031cc9991a0f4eb9dcaca5b7d9ca9c636d.tar.gz |
Merge commit '424b929b5cb9ca4094099f25179829260d4b0fa3'
* commit '424b929b5cb9ca4094099f25179829260d4b0fa3':
pulse: Add a wallclock option to be compatible with other other captures
Conflicts:
libavdevice/pulse_audio_dec.c
wallclock mode was supported and default in FFmpeg already before this commit.
its thus left the default
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/pulse_audio_dec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index a7b0e5d8c1..316cc4aa62 100644 --- a/libavdevice/pulse_audio_dec.c +++ b/libavdevice/pulse_audio_dec.c @@ -48,6 +48,7 @@ typedef struct PulseData { TimeFilter *timefilter; int last_period; + int wallclock; } PulseData; @@ -311,7 +312,8 @@ static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt) dts += latency; } else dts -= latency; - pkt->pts = ff_timefilter_update(pd->timefilter, dts, pd->last_period); + if (pd->wallclock) + pkt->pts = ff_timefilter_update(pd->timefilter, dts, pd->last_period); pd->last_period = frame_duration; } else { @@ -346,6 +348,7 @@ static const AVOption options[] = { { "channels", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1, INT_MAX, D }, { "frame_size", "set number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, D }, { "fragment_size", "set buffering size, affects latency and cpu usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D }, + { "wallclock", "set the initial pts using the current time", OFFSET(wallclock), AV_OPT_TYPE_INT, {.i64 = 1}, -1, 1, D }, { NULL }, }; |