Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 192645 Details for
Bug 271476
=media-video/transcode-1.1.7: text relocation in aclib
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for "implicit decraration" and strict aliasing
cleanup.patch (text/plain), 3.26 KB, created by
Rafał Mużyło
on 2009-05-27 22:52:44 UTC
(
hide
)
Description:
fix for "implicit decraration" and strict aliasing
Filename:
MIME Type:
Creator:
Rafał Mużyło
Created:
2009-05-27 22:52:44 UTC
Size:
3.26 KB
patch
obsolete
>--- export/export_mov.c.old 2009-02-21 22:01:57.000000000 +0100 >+++ export/export_mov.c 2009-05-27 17:45:43.000000000 +0200 >@@ -30,6 +30,7 @@ > #define MOD_CODEC "(video) * | (audio) *" > > #include "transcode.h" >+#include "libtc/optstr.h" > #include "import/magic.h" > #include "encoder.h" > #include "libtcvideo/tcvideo.h" >--- import/import_mov.c.old 2009-02-21 22:01:57.000000000 +0100 >+++ import/import_mov.c 2009-05-27 17:44:55.000000000 +0200 >@@ -27,6 +27,7 @@ > #define MOD_CODEC "(video) * | (audio) *" > > #include "transcode.h" >+#include "filter.h" > > static int verbose_flag = TC_QUIET; > static int capability_flag = TC_CAP_PCM | TC_CAP_RGB | TC_CAP_YUV | >--- import/import_pvn.c.old 2009-02-21 22:01:57.000000000 +0100 >+++ import/import_pvn.c 2009-05-27 18:00:54.000000000 +0200 >@@ -503,19 +503,19 @@ > val = inptr[x*4] ^ 0x80; > break; > case SINGLE: { >- float f; >+ union {float f;uint32_t u;} f; > /* Convert from big-endian to native format */ >- *((uint32_t *)&f) = (uint32_t)(inptr[x*4 ]) << 24 >+ f.u = (uint32_t)(inptr[x*4 ]) << 24 > | (uint32_t)(inptr[x*4+1]) << 16 > | (uint32_t)(inptr[x*4+2]) << 8 > | (uint32_t)(inptr[x*4+3]); >- val = (int)floor(((f - single_base) / single_range) * 255 + 0.5); >+ val = (int)floor(((f.f - single_base) / single_range) * 255 + 0.5); > break; > } // SINGLE > case DOUBLE: { >- double d; >+ union {double d; uint64_t u} d; > /* Convert from big-endian to native format */ >- *((uint64_t *)&d) = (uint64_t)(inptr[x*8 ]) << 56 >+ d.u = (uint64_t)(inptr[x*8 ]) << 56 > | (uint64_t)(inptr[x*8+1]) << 48 > | (uint64_t)(inptr[x*8+2]) << 40 > | (uint64_t)(inptr[x*8+3]) << 32 >@@ -523,7 +523,7 @@ > | (uint64_t)(inptr[x*8+5]) << 16 > | (uint64_t)(inptr[x*8+6]) << 8 > | (uint64_t)(inptr[x*8+7]); >- val = (int)floor(((d - double_base) / double_range) * 255 + 0.5); >+ val = (int)floor(((d.d - double_base) / double_range) * 255 + 0.5); > break; > } // DOUBLE > } // switch (datatype) >--- aclib/accore.c.old 2009-02-21 15:34:02.000000000 +0100 >+++ aclib/accore.c 2009-05-27 18:06:30.000000000 +0200 >@@ -164,9 +164,9 @@ > /* Determine the maximum function number available, and save the vendor > * string */ > CPUID(0, cpuid_max, ebx, ecx, edx); >- *((uint32_t *)(cpu_vendor )) = ebx; >- *((uint32_t *)(cpu_vendor+4)) = edx; >- *((uint32_t *)(cpu_vendor+8)) = ecx; >+ memcpy(cpu_vendor, &ebx, 4); >+ memcpy(cpu_vendor+4, &edx, 4); >+ memcpy(cpu_vendor+8, &ecx, 4); > cpu_vendor[12] = 0; > cpuid_ext_max = 0; /* FIXME: how do early CPUs respond to 0x80000000? */ > CPUID(0x80000000, cpuid_ext_max, ebx, ecx, edx);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271476
: 192645 |
192646