diff options
author | Herve Quiroz <hq@FreeBSD.org> | 2006-10-09 23:01:45 +0000 |
---|---|---|
committer | Herve Quiroz <hq@FreeBSD.org> | 2006-10-09 23:01:45 +0000 |
commit | 5e09b5967f2d6506220515d72003c149f733e884 (patch) | |
tree | 6f1746ed69d33f2422d8b9061e5814e7d0cd8de7 /multimedia | |
parent | - Update games/atitd's distfile name. (diff) |
Add patches from upstream:
- Fix build on amd64
- Fix build with mplayer < 1.0pre8
- Fix audio overhead
Notes
Notes:
svn path=/head/; revision=175163
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/ogmrip/files/patch-amd64 | 58 | ||||
-rw-r--r-- | multimedia/ogmrip/files/patch-fix_audio_overhead | 24 |
2 files changed, 82 insertions, 0 deletions
diff --git a/multimedia/ogmrip/files/patch-amd64 b/multimedia/ogmrip/files/patch-amd64 new file mode 100644 index 000000000000..811e3ccd2a22 --- /dev/null +++ b/multimedia/ogmrip/files/patch-amd64 @@ -0,0 +1,58 @@ +* Fix compilation on amd64 +* Fix compilation with mplayer < 1.0pre8 + +Index: libogmrip/ogmrip-backend.c +=================================================================== +--- libogmrip/ogmrip-backend.c (révision 843) ++++ libogmrip/ogmrip-backend.c (copie de travail) +@@ -406,8 +406,7 @@ + gdouble + ogmrip_backend_dvdcpy_watch (OGMJobExec *exec, const gchar *buffer, OGMRipVideo *video) + { +- size_t bytes, total; +- guint percent; ++ guint bytes, total, percent; + + if (sscanf (buffer, "%u/%u blocks written (%u%%)", &bytes, &total, &percent) == 3) + return percent / 100.; +@@ -1378,8 +1377,12 @@ + GPtrArray *argv; + + const gchar *device; +- gint vid, sstep; ++ gint vid; + ++#if MPLAYER_PRE >= 8 ++ gint sstep; ++#endif ++ + g_return_val_if_fail (OGMRIP_IS_VIDEO (video), NULL); + + title = ogmrip_codec_get_input (OGMRIP_CODEC (video)); +Index: dvdcpy/dvdcpy.c +=================================================================== +--- dvdcpy/dvdcpy.c (révision 843) ++++ dvdcpy/dvdcpy.c (copie de travail) +@@ -286,11 +286,11 @@ + } + + current_size += count; +- fprintf (stdout, "\r%d/%d blocks written (%d%%)", current_size, total_size, current_size * 100 / total_size); ++ fprintf (stdout, "\r%zd/%zd blocks written (%zd%%)", current_size, total_size, current_size * 100 / total_size); + fflush (stdout); + } + +- fprintf (stdout, "\r%d/%d blocks written (%d%%)", current_size, total_size, current_size * 100 / total_size); ++ fprintf (stdout, "\r%zd/%zd blocks written (%zd%%)", current_size, total_size, current_size * 100 / total_size); + fflush (stdout); + + return size; +@@ -801,7 +801,7 @@ + + if (total_size > get_space_left (output)) + { +- fprintf (stderr, "Error: Not enough space left on device (%d bytes needed)\n", total_size); ++ fprintf (stderr, "Error: Not enough space left on device (%zd bytes needed)\n", total_size); + ifoClose (vmg_file); + DVDClose (reader); + return EXIT_FAILURE; diff --git a/multimedia/ogmrip/files/patch-fix_audio_overhead b/multimedia/ogmrip/files/patch-fix_audio_overhead new file mode 100644 index 000000000000..e19e0eef3915 --- /dev/null +++ b/multimedia/ogmrip/files/patch-fix_audio_overhead @@ -0,0 +1,24 @@ +Fix audio overhead + +Index: libogmrip/ogmrip-container.c +=================================================================== +--- libogmrip/ogmrip-container.c (révision 843) ++++ libogmrip/ogmrip-container.c (copie de travail) +@@ -563,12 +563,15 @@ + ogmrip_container_get_audio_overhead (OGMRipContainer *container, OGMRipContainerChild *child) + { + glong length; +- gint samples_per_frame, bitrate = 0; ++ gint samples_per_frame, sample_rate; ++ guint numerator, denominator; + + length = ogmrip_codec_get_length (child->codec, NULL); ++ sample_rate = ogmrip_audio_get_sample_rate (OGMRIP_AUDIO (child->codec)); + samples_per_frame = ogmrip_audio_get_samples_per_frame (OGMRIP_AUDIO (child->codec)); ++ ogmrip_codec_get_framerate (OGMRIP_CODEC (child->codec), &numerator, &denominator); + +- return (gint64) length * bitrate * container->priv->overhead / (gdouble) samples_per_frame; ++ return (gint64) length * sample_rate * denominator * container->priv->overhead / (gdouble) (samples_per_frame * numerator); + } + + static gint64 |