aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/pulse_audio_enc.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-04-30 00:23:14 +0200
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-04-30 00:35:42 +0200
commita1e5be5c1a0c98206a1ae034d278702f5c8ef2a3 (patch)
tree55d456892f732ad012542440d1dc5f78a7075d24 /libavdevice/pulse_audio_enc.c
parent954a8f448355ded25bb2638d54d652be736b84d5 (diff)
downloadffmpeg-a1e5be5c1a0c98206a1ae034d278702f5c8ef2a3.tar.gz
lavd/pulse_audio_enc: add pointer checks
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavdevice/pulse_audio_enc.c')
-rw-r--r--libavdevice/pulse_audio_enc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c
index 8acbe8b99f..b8c77db85c 100644
--- a/libavdevice/pulse_audio_enc.c
+++ b/libavdevice/pulse_audio_enc.c
@@ -692,8 +692,10 @@ static void pulse_get_output_timestamp(AVFormatContext *h, int stream, int64_t *
pa_threaded_mainloop_lock(s->mainloop);
pa_stream_get_latency(s->stream, &latency, &neg);
pa_threaded_mainloop_unlock(s->mainloop);
- *wall = av_gettime();
- *dts = s->timestamp - (neg ? -latency : latency);
+ if (wall)
+ *wall = av_gettime();
+ if (dts)
+ *dts = s->timestamp - (neg ? -latency : latency);
}
static int pulse_get_device_list(AVFormatContext *h, AVDeviceInfoList *device_list)