PiRSquared17 / flac2all

Automatically exported from code.google.com/p/flac2all
0 stars 0 forks source link

decoder.flush() #if there is any data left in the buffer, clear it #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I get an exception all the time, the files are fine though:

Exception in thread Thread-118:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/sbin/flac2all", line 595, in encode_thread
    mp3Class.mp3convert(opts['lameopts'],current_file,outfile)
  File "/usr/local/sbin/flac2all", line 509, in mp3convert
    decoder.flush() #if there is any data left in the buffer, clear it
IOError: [Errno 9] Bad file descriptor

This can be fixed by changing

        decoder = os.popen(flacpath + "flac -d -s -c " + shell().parseEscapechars(infile),'rb',1024)
to
        decoder = os.popen(flacpath + "flac -d -s -c " + shell().parseEscapechars(infile),'w+b',1024)

Original issue reported on code.google.com by moritzwe...@gmail.com on 8 Feb 2014 at 4:06

GoogleCodeExporter commented 9 years ago
Can you tell me what version of Python you are using? On what OS? And whether 
you have tried with the latest SVN version of the code. 

That sounds like a rather particular issue you have there, as apparently the 
program works, yet gives you errors. 

Original comment by i...@ziva-vatra.com on 23 Feb 2014 at 7:25

GoogleCodeExporter commented 9 years ago
Well, no response for a few months. I'll assume you found what the problem was. 
Closing ticket. 

Original comment by i...@ziva-vatra.com on 19 Jul 2014 at 11:19