thp: set duration for audio stream too
authorPaul B Mahol <onemda@gmail.com>
Thu, 5 Nov 2015 11:04:53 +0000 (12:04 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 12 Nov 2015 03:39:14 +0000 (04:39 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/thp.c

index 18d4afe..27d7ab4 100644 (file)
@@ -126,6 +126,7 @@ static int thp_read_header(AVFormatContext *s)
             st->codec->codec_tag = 0;  /* no fourcc */
             st->codec->channels    = avio_rb32(pb); /* numChannels.  */
             st->codec->sample_rate = avio_rb32(pb); /* Frequency.  */
+            st->duration           = avio_rb32(pb);
 
             avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);