avisynth: set duration of audio streams
authorHendrik Leppkes <h.leppkes@gmail.com>
Thu, 8 May 2014 13:51:15 +0000 (09:51 -0400)
committerAnton Khirnov <anton@khirnov.net>
Fri, 16 May 2014 12:41:02 +0000 (14:41 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/avisynth.c

index a8d46a2..f94f7b7 100644 (file)
@@ -303,6 +303,7 @@ static int avisynth_create_stream_audio(AVFormatContext *s, AVStream *st)
     st->codec->channels    = avs->vi->nchannels;
     st->time_base          = (AVRational) { 1,
                                             avs->vi->audio_samples_per_second };
+    st->duration           = avs->vi->num_audio_samples;
 
     switch (avs->vi->sample_type) {
     case AVS_SAMPLE_INT8: