1e1bcc9986
amd64. playdv can now play at the proper rate on amd64 machines. Changes in the port: * Remove inter-library dependencies (does not affect dependent ports). * Fix playdv double-free crash at EOF. * Can no longer be built with SEPARATE_BUILD, needs more investigation. * WANTLIB markers. From: Jacob Meuser <jakemsr@jakemsr.com>
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
$OpenBSD: patch-libdv_dv_c,v 1.3 2005/02/22 22:24:36 naddy Exp $
|
|
--- libdv/dv.c.orig Tue Oct 19 20:49:24 2004
|
|
+++ libdv/dv.c Fri Feb 11 01:22:37 2005
|
|
@@ -67,8 +67,12 @@
|
|
#define DV_MB420_YUV_MMX(a,b,c,d,e) dv_mb420_YUY2_mmx(a,b,c,d,e)
|
|
#endif
|
|
|
|
+#ifndef MIN
|
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
|
+#endif
|
|
+#ifndef MAX
|
|
#define MAX(a,b) ((a)<(b)?(b):(a))
|
|
+#endif
|
|
|
|
int dv_use_mmx;
|
|
|
|
@@ -798,7 +802,7 @@ dv_get_timestamp (dv_decoder_t *dv, char
|
|
int id;
|
|
|
|
if ((id = dv -> ssyb_pack [0x13]) != 0xff) {
|
|
- sprintf (tstptr,
|
|
+ snprintf (tstptr, 128,
|
|
"%02d:%02d:%02d.%02d",
|
|
((dv -> ssyb_data [id] [3] >> 4) & 0x03) * 10 +
|
|
(dv -> ssyb_data [id] [3] & 0x0f),
|
|
@@ -853,7 +857,7 @@ dv_get_recording_datetime (dv_decoder_t
|
|
year = dv -> ssyb_data [id1] [3];
|
|
year = (year & 0x0f) + 10 * ((year >> 4) & 0x0f);
|
|
year += (year < 25) ? 2000 : 1900;
|
|
- sprintf (dtptr,
|
|
+ snprintf (dtptr, 128,
|
|
"%04d-%02d-%02d %02d:%02d:%02d",
|
|
year,
|
|
((dv -> ssyb_data [id1] [2] >> 4) & 0x01) * 10 +
|
|
@@ -875,7 +879,7 @@ dv_get_recording_datetime (dv_decoder_t
|
|
year = dv -> vaux_data [id1] [3];
|
|
year = (year & 0x0f) + 10 * ((year >> 4) & 0x0f);
|
|
year += (year < 25) ? 2000 : 1900;
|
|
- sprintf (dtptr,
|
|
+ snprintf (dtptr, 128,
|
|
"%04d-%02d-%02d %02d:%02d:%02d",
|
|
year,
|
|
((dv -> vaux_data [id1] [2] >> 4) & 0x01) * 10 +
|