avconv: set the encoding/decoding_needed flags earlier