1. Ivan Andrianov
  2. fftranscoder

Commits

Ivan Andrianov  committed 8177a77

Codecs fix.

  • Participants
  • Parent commits aec35e8
  • Branches default

Comments (0)

Files changed (1)

File fftranscoder/codecs.py

View file
 
 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)