avdevice/pulse_audio_enc: fix stream index
authorLukasz Marek <lukasz.m.luki@gmail.com>
Sat, 12 Oct 2013 10:51:41 +0000 (12:51 +0200)
committerLukasz Marek <lukasz.m.luki@gmail.com>
Sat, 12 Oct 2013 11:52:26 +0000 (13:52 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
libavdevice/pulse_audio_enc.c

index 5f96bec..25caa65 100644 (file)
@@ -118,7 +118,7 @@ static void pulse_get_output_timestamp(AVFormatContext *h, int stream, int64_t *
     PulseData *s = h->priv_data;
     pa_usec_t latency = pa_simple_get_latency(s->pa, NULL);
     *wall = av_gettime();
-    *dts = h->streams[0]->cur_dts - latency;
+    *dts = h->streams[s->stream_index]->cur_dts - latency;
 }
 
 #define OFFSET(a) offsetof(PulseData, a)