summaryrefslogtreecommitdiff
path: root/libavformat/thp.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-02-29 18:08:46 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-03-03 16:58:45 -0500
commit5a9b952201e5fde03be619dc59bda10463abeefa (patch)
treeb4dbb3b88cb736a265c8b3d4011d6e3318956b8f /libavformat/thp.c
parent5602a464c9f9e3c0922f5cfeccaf2fa1c40b2401 (diff)
downloadffmpeg-5a9b952201e5fde03be619dc59bda10463abeefa.tar.gz
thp: set audio packet durations
Diffstat (limited to 'libavformat/thp.c')
-rw-r--r--libavformat/thp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 731f5af968..5a1205eb9a 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -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++;
}