thp: set audio packet durations
authorJustin Ruggles <justin.ruggles@gmail.com>
Wed, 29 Feb 2012 23:08:46 +0000 (18:08 -0500)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 3 Mar 2012 21:58:45 +0000 (16:58 -0500)
libavformat/thp.c

index 731f5af..5a1205e 100644 (file)
@@ -181,6 +181,9 @@ static int thp_read_packet(AVFormatContext *s,
         }
 
         pkt->stream_index = thp->audio_stream_index;
+        if (thp->audiosize >= 8)
+            pkt->duration = AV_RB32(&pkt->data[4]);
+
         thp->audiosize = 0;
         thp->frame++;
     }