summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <clement.boesch@smartjog.com>2012-01-04 17:30:03 +0100
committerClément Bœsch <ubitux@gmail.com>2012-01-11 18:14:13 +0100
commitca1bae3983c6592efe4635e7e35a1f85833674b8 (patch)
tree92b2b5a2e0aa0692d2eb44692a37b3e8dfd2eae2 /libavcodec
parentf1db99166b2eb0f8b005ec43587a02c03a6d0506 (diff)
timecode: support >24h timecode.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/timecode.c2
-rw-r--r--libavcodec/timecode.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/timecode.c b/libavcodec/timecode.c
index 8e2e599c21..2e0f4a489b 100644
--- a/libavcodec/timecode.c
+++ b/libavcodec/timecode.c
@@ -94,7 +94,7 @@ char *avpriv_timecode_to_string(char *buf, const struct ff_timecode *tc, unsigne
ff = frame_num % fps;
ss = frame_num / fps % 60;
mm = frame_num / (fps*60) % 60;
- hh = frame_num / (fps*3600) % 24;
+ hh = frame_num / (fps*3600);
snprintf(buf, 16, "%s%02d:%02d:%02d%c%02d",
neg ? "-" : "",
hh, mm, ss, tc->drop ? ';' : ':', ff);
diff --git a/libavcodec/timecode.h b/libavcodec/timecode.h
index 076f04763f..ee03fdab7f 100644
--- a/libavcodec/timecode.h
+++ b/libavcodec/timecode.h
@@ -67,7 +67,8 @@ uint32_t avpriv_framenum_to_smpte_timecode(unsigned frame, int fps, int drop);
* @param tc Timecode struct pointer
* @param frame Frame id (timecode frame is computed with tc->start+frame)
* @return a pointer to the buf parameter
- * @note timecode representation can be a negative timecode
+ * @note timecode representation can be a negative timecode and have
+ * more than 24 hours.
* @note buf must have enough space to store the timecode representation: 16
* bytes is the minimum required size.
*/