summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
index 3df23249..9a1ab2a 100644
--- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp
+++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
@@ -43,6 +43,7 @@
43// for network handling 43// for network handling
44#include <netinet/in.h> 44#include <netinet/in.h>
45#include <netdb.h> 45#include <netdb.h>
46#include <linux/limits.h>
46#include <sys/socket.h> 47#include <sys/socket.h>
47#include <arpa/inet.h> 48#include <arpa/inet.h>
48#include <unistd.h> 49#include <unistd.h>
@@ -434,19 +435,14 @@ bool LibMadPlugin::open( const QString& path ) {
434 435
435 //qDebug( "Opening %s", path.latin1() ); 436 //qDebug( "Opening %s", path.latin1() );
436 437
437
438 if (path.left( 4 ) == "http" ) { 438 if (path.left( 4 ) == "http" ) {
439 qDebug("Test2");
440 // in case of any error we get 0 here 439 // in case of any error we get 0 here
441 if ( !(http_open(path) == 0) ) { 440 if ( !(http_open(path) == 0) ) {
442 qDebug("Test3");
443 d->input.fd = http_open(path); 441 d->input.fd = http_open(path);
444 } else { 442 } else {
445 qDebug("Test5");
446 return FALSE; 443 return FALSE;
447 } 444 }
448 } else { 445 } else {
449 qDebug("Test4");
450 d->input.path = path.latin1(); 446 d->input.path = path.latin1();
451 d->input.fd = ::open( d->input.path, O_RDONLY ); 447 d->input.fd = ::open( d->input.path, O_RDONLY );
452 // thats a better place, since it should only seek for ID3 tags on mp3 files, not streams 448 // thats a better place, since it should only seek for ID3 tags on mp3 files, not streams
@@ -454,11 +450,9 @@ bool LibMadPlugin::open( const QString& path ) {
454 } 450 }
455 if (d->input.fd == -1) { 451 if (d->input.fd == -1) {
456 qDebug("error opening %s", d->input.path ); 452 qDebug("error opening %s", d->input.path );
457 return FALSE; 453 return FALSE;
458 } 454 }
459 455
460// printID3Tags();
461
462#if defined(HAVE_MMAP) 456#if defined(HAVE_MMAP)
463 struct stat stat; 457 struct stat stat;
464 if (fstat(d->input.fd, &stat) == -1) { 458 if (fstat(d->input.fd, &stat) == -1) {