Commits

Ivan Andrianov committed 8177a77

Codecs fix.

  • Participants
  • Parent commits aec35e8

Comments (0)

Files changed (1)

fftranscoder/codecs.py

 
 def getDestinationCodecsAndBitRates(sourceCodec, sourceBitRate = None):
     if sourceCodec.isLossy():
-        destinationCodecs = filter(lambda codec: codec.isLossy() and codec != sourceCodec, __codecs)
+        destinationCodecs = filter(lambda codec: codec.isLossy() and codec != sourceCodec and codec.hasEncoder(), __codecs)
         destinationBitRates = filter(lambda bitRate: bitRate <= sourceBitRate, __bitRates)
     else:
-        destinationCodecs = filter(lambda codec: codec != sourceCodec, __codecs)
+        destinationCodecs = filter(lambda codec: codec != sourceCodec and codec.hasEncoder(), __codecs)
         destinationBitRates = __bitRates
     return (destinationCodecs, destinationBitRates)