avisynth: set duration of audio streams
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 4 May 2014 10:55:58 +0000 (12:55 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 5 May 2014 02:38:33 +0000 (04:38 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avisynth.c

index b837bd9..c01d7e4 100644 (file)
@@ -294,6 +294,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: