Bug#528802: vorbis-tools: ogg123 thinks any file it opens is seekable

Francois Ouellet disposable87406 at mpact.tv
Fri May 15 18:02:31 UTC 2009


Package: vorbis-tools
Version: 1.2.0-5
Severity: normal
Tags: patch

When /proc/self/fd/0 is passed to ogg123 as the file to play, it
thinks it is seekable and fails to play.  Even though `-' could be used
instead in this example, I have a more complex situation that has to
use /proc/self/fd/0.

This simple patch fixes the problem.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_CA (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages vorbis-tools depends on:
ii  libao2                    0.8.8-4        Cross Platform Audio Output Librar
ii  libc6                     2.7-18         GNU C Library: Shared libraries
ii  libcurl3-gnutls           7.18.2-8lenny2 Multi-protocol file transfer libra
ii  libflac8                  1.2.1-1.2      Free Lossless Audio Codec - runtim
ii  libogg0                   1.1.3-4        Ogg Bitstream Library
ii  libspeex1                 1.2~rc1-1      The Speex codec runtime library
ii  libvorbis0a               1.2.0.dfsg-3.1 The Vorbis General Audio Compressi
ii  libvorbisenc2             1.2.0.dfsg-3.1 The Vorbis General Audio Compressi
ii  libvorbisfile3            1.2.0.dfsg-3.1 The Vorbis General Audio Compressi

vorbis-tools recommends no packages.

vorbis-tools suggests no packages.

-- no debconf information
-------------- next part --------------
--- file_transport.c.orig	2009-05-15 13:20:05.000000000 -0400
+++ file_transport.c	2009-05-15 11:45:12.000000000 -0400
@@ -69,8 +69,12 @@
   if (strcmp(source_string, "-") == 0) {
     private->fp = stdin;
     private->seekable = 0;
-  } else
+  } else {
     private->fp = fopen(source_string, "r");
+	if (lseek(fileno(private->fp), 0, SEEK_CUR) == -1) {
+      private->seekable = 0;
+	}
+  }
 
   if (private->fp == NULL) {
     free(source->source_string);


More information about the pkg-xiph-maint mailing list